1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-30 18:49:39 +02:00

Clean up account creational methods

This commit is contained in:
Zach Gollwitzer 2025-07-09 13:28:37 -04:00
parent a7cd046563
commit 3b6a5a573f
6 changed files with 313 additions and 135 deletions

View file

@ -35,9 +35,10 @@ class AccountTest < ActiveSupport::TestCase
# Currency updates earn their own method because updating an account currency incurs
# side effects like recalculating balances, etc.
test "can update the account currency" do
@account.update_currency("EUR")
@account.update_currency!("EUR")
assert_equal "EUR", @account.currency
assert_equal "EUR", @account.entries.valuations.first.currency
end
# If a user has an opening balance (valuation) for their manual account and has 1+ transactions, the intent of