olvrwn / CashBud

0 stars 0 forks source link

Sweep: Update OverviewViewModelTest #77

Open olvrwn opened 1 year ago

olvrwn commented 1 year ago

In OverviewViewModelTest.swift, add unit tests to test the OverviewViewModel.

Checklist - [X] `CashBudTests/Tests/Manager/TransactionsManagerMock.swift` ✅ Commit [`b289615`](https://github.com/olvrwn/CashBud/commit/b28961529be33ef1a0b32f253586a93ec1c80b93)
Create a new file called TransactionsManagerMock.swift in the CashBudTests/Tests/Manager/ directory. This file will contain a mock implementation of the TransactionsManager class.
Sandbox Execution Logs
trunk init 1/3 ✓
⡿ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
⣷ Downloading Trunk 1.16.0...
✔ Downloading Trunk 1.16.0... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 7 linters were enabled (.trunk/trunk.yaml)
  checkov 2.4.9 (2 yaml files)
  git-diff-check (5 files)
  markdownlint 0.37.0 (1 markdown file) (created .markdownlint.yaml)
  prettier 3.0.3 (1 markdown, 2 yaml files)
  trivy 0.45.1 (2 yaml files)
  trufflehog 3.56.1 (5 files)
  yamllint 1.32.0 (2 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt CashBudTests/Tests/Manager/TransactionsManagerMock.swift 2/3 ✓

Found no applicable linters for the requested path
trunk check --fix CashBudTests/Tests/Manager/TransactionsManagerMock.swift 3/3 ✓

Checked 1 file
✔ No issues
- [X] `CashBudTests/Tests/ViewModels/OverviewViewModelTest.swift` ❌ Failed
Import the TransactionsManagerMock file at the top of the file. Replace the existing test cases with new test cases that use the TransactionsManagerMock to test the OverviewViewModel.
Checklist - [X] `CashBudTests/Tests/ViewModels/OverviewViewModelTest.swift` ❌ Failed
• Import the TransactionsManagerMock file at the top of the file. • Replace the existing test cases with new test cases that use the TransactionsManagerMock to test the OverviewViewModel.
Sandbox Execution Logs
trunk init 1/3 ✓
⡿ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
⣷ Downloading Trunk 1.16.0...
✔ Downloading Trunk 1.16.0... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 7 linters were enabled (.trunk/trunk.yaml)
  checkov 2.4.9 (2 yaml files)
  git-diff-check (5 files)
  markdownlint 0.37.0 (1 markdown file) (created .markdownlint.yaml)
  prettier 3.0.3 (1 markdown, 2 yaml files)
  trivy 0.45.1 (2 yaml files)
  trufflehog 3.56.1 (5 files)
  yamllint 1.32.0 (2 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt CashBudTests/Tests/ViewModels/OverviewViewModelTest.swift 2/3 ✓

Found no applicable linters for the requested path
trunk check --fix CashBudTests/Tests/ViewModels/OverviewViewModelTest.swift 3/3 ✓

Checked 1 file
✔ No issues
sweep-ai[bot] commented 1 year ago
Sweeping

50%

Actions (click)


❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred. Try changing the issue description to re-trigger Sweep. If this error persists contact team@sweep.dev.

For bonus GPT-4 tickets, please report this bug on Discord.


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
CashBudTests/Tests/ViewModels/OverviewViewModelTest.swift Modify CashBudTests/Tests/ViewModels/OverviewViewModelTest.swift with contents:
• Import the TransactionsManagerMock file at the top of the file.
• Replace the existing test cases with new test cases that use the TransactionsManagerMock to test the OverviewViewModel.

🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.