mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Account::Sync model and test fixture simplifications (#968)
* Add sync model * Fresh fixtures for sync tests * Sync tests overhaul * Fix entry tests * Complete remaining model test updates * Update system tests * Update demo data task * Add system tests back to PR checks * More simplifications, add empty family to fixtures for easier testing
This commit is contained in:
parent
de5a2e55b3
commit
c6bdf49f10
60 changed files with 929 additions and 1353 deletions
|
@ -14,8 +14,8 @@ class Account::TransfersControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_difference "Account::Transfer.count", 1 do
|
||||
post account_transfers_url, params: {
|
||||
account_transfer: {
|
||||
from_account_id: accounts(:checking).id,
|
||||
to_account_id: accounts(:savings).id,
|
||||
from_account_id: accounts(:depository).id,
|
||||
to_account_id: accounts(:credit_card).id,
|
||||
date: Date.current,
|
||||
amount: 100,
|
||||
currency: "USD",
|
||||
|
@ -28,7 +28,7 @@ class Account::TransfersControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "can destroy transfer" do
|
||||
assert_difference -> { Account::Transfer.count } => -1, -> { Account::Transaction.count } => 0 do
|
||||
delete account_transfer_url(account_transfers(:credit_card_payment))
|
||||
delete account_transfer_url(account_transfers(:one))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue