mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Fix account deletion cascade bug (#1644)
* Fix account deletion cascade bug * Rubocop fixes
This commit is contained in:
parent
9808641110
commit
abccba3947
6 changed files with 65 additions and 30 deletions
|
@ -8,6 +8,12 @@ class AccountTest < ActiveSupport::TestCase
|
|||
@family = families(:dylan_family)
|
||||
end
|
||||
|
||||
test "can destroy" do
|
||||
assert_difference "Account.count", -1 do
|
||||
@account.destroy
|
||||
end
|
||||
end
|
||||
|
||||
test "groups accounts by type" do
|
||||
result = @family.accounts.by_group(period: Period.all)
|
||||
assets = result[:assets]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue