mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
Update properties controller to use new creational and update balance methods
This commit is contained in:
parent
d459ebdad8
commit
25f0c78c47
17 changed files with 500 additions and 144 deletions
|
@ -64,7 +64,7 @@ class Account::ReconcileableTest < ActiveSupport::TestCase
|
|||
|
||||
# No new valuation is appended; we're just adjusting the opening valuation anchor
|
||||
assert_no_difference "account.entries.count" do
|
||||
account.update_current_balance(balance: 1000, cash_balance: 1000)
|
||||
account.update_current_balance!(balance: 1000, cash_balance: 1000)
|
||||
end
|
||||
|
||||
opening_valuation = account.valuations.first
|
||||
|
@ -113,7 +113,7 @@ class Account::ReconcileableTest < ActiveSupport::TestCase
|
|||
assert_equal 2, account.valuations.count
|
||||
|
||||
# Here, we assume user is once again "overriding" the balance to 1400
|
||||
account.update_current_balance(balance: 1400, cash_balance: 1400)
|
||||
account.update_current_balance!(balance: 1400, cash_balance: 1400)
|
||||
|
||||
most_recent_valuation = account.valuations.joins(:entry).order("entries.date DESC").first
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue