mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Isolate infinite loop bug, add timeout to actions (#583)
* Isolate infinite loop bug, add timeout to actions * Increase timeout to allow for temporary failure * Set correct timeout, implement temporary fix * Trigger syncs at controller layer
This commit is contained in:
parent
2d406274ac
commit
b1bfdef8ff
7 changed files with 36 additions and 20 deletions
|
@ -110,4 +110,22 @@ class AccountTest < ActiveSupport::TestCase
|
|||
# We know EUR -> NZD exchange rate is not available in fixtures
|
||||
assert_equal 0, account.series(currency: "NZD").values.count
|
||||
end
|
||||
|
||||
test "should destroy dependent transactions" do
|
||||
assert_difference("Transaction.count", -@account.transactions.count) do
|
||||
@account.destroy
|
||||
end
|
||||
end
|
||||
|
||||
test "should destroy dependent balances" do
|
||||
assert_difference("Account::Balance.count", -@account.balances.count) do
|
||||
@account.destroy
|
||||
end
|
||||
end
|
||||
|
||||
test "should destroy dependent valuations" do
|
||||
assert_difference("Valuation.count", -@account.valuations.count) do
|
||||
@account.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue