feat(transfers): add transfers and rejected-transfers commands#18
Conversation
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 56 minutes and 16 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ff14ea8 to
4ea35b2
Compare
Read-only coverage for `/api/v1/transfers` and `/api/v1/rejected_transfers`: - `transfers list` with `--status`, `--account-id`, `--start-date`, `--end-date`, and paging flags. Mirrors the upstream `Api::V1::TransferDecisionFiltering` concern (status is validated upstream against `Transfer.statuses`; account_id against UUID; dates filter the underlying entries.date). - `transfers show <id>`. - `rejected-transfers list` — same filters minus `--status` (the RejectedTransfer model has no status column). - `rejected-transfers show <id>`. Tests cover command shape, registration, expected flag set, and the invariant that `rejected-transfers list` must NOT expose `--status`. Part of #11 (P1.2).
Same fix as #17: cobra's Find returns the nearest matching ancestor when a leaf is missing, so the prior test would silently pass even if a subcommand had been deregistered. Compare resolved Name() to the expected leaf.
4ea35b2 to
117aff0
Compare
Adds read-only coverage for the upstream
/api/v1/transfersand/api/v1/rejected_transfersendpoints, completing P1.2 of #11.Commands
Filter mapping (matches upstream concern)
Both endpoints share
Api::V1::TransferDecisionFiltering:--statusTransfer.statusesenum keys--account-id--start-date/--end-dateentries.daterejected-transfers listdeliberately does not expose--status: theRejectedTransfermodel has no status column, and passingstatusto that controller is a no-op upstream. A test (TestRejectedTransfersCommandShape) locks this invariant in.Tests
TestTransfersCommandShape— verifies subcommands + full flag set onlist, Args validator onshow.TestRejectedTransfersCommandShape— same, plus the no---statusguard.TestTransfersCommandsRegistered— both registered on the root command.Full suite green (
go test ./...).Docs
docs/ROADMAP.md— moved to Completed.Refs #11.