mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-10 07:55:21 +02:00
Add auto-update strategies for current balance on manual accounts (#2460)
* Add auto-update strategies for current balance on manual accounts * Remove deprecated BalanceUpdater, replace with new methods
This commit is contained in:
parent
52333e3fa6
commit
3eea5a9891
13 changed files with 311 additions and 136 deletions
|
@ -88,7 +88,7 @@ class Account::ReconciliationManagerTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
test "dry run does not persist or sync account" do
|
||||
test "dry run does not persist account" do
|
||||
@account.balances.create!(date: Date.current, balance: 1000, cash_balance: 500, currency: @account.currency)
|
||||
|
||||
assert_no_difference "Valuation.count" do
|
||||
|
@ -96,7 +96,6 @@ class Account::ReconciliationManagerTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
assert_difference "Valuation.count", 1 do
|
||||
@account.expects(:sync_later).once
|
||||
@manager.reconcile_balance(balance: 1200, date: Date.current)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue