mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Do not include income transactions in liability accounts for savings rate (#1385)
* Do not include income transactions in liability accounts for savings rate * Do not include income in liability accounts in savings rate chart
This commit is contained in:
parent
7946cd7819
commit
2b61821336
2 changed files with 5 additions and 1 deletions
|
@ -125,9 +125,11 @@ class FamilyTest < ActiveSupport::TestCase
|
|||
|
||||
test "calculates rolling transaction totals" do
|
||||
account = create_account(balance: 1000, accountable: Depository.new)
|
||||
liability_account = create_account(balance: 1000, accountable: Loan.new)
|
||||
create_transaction(account: account, date: 2.days.ago.to_date, amount: -500)
|
||||
create_transaction(account: account, date: 1.day.ago.to_date, amount: 100)
|
||||
create_transaction(account: account, date: Date.current, amount: 20)
|
||||
create_transaction(account: liability_account, date: 2.days.ago.to_date, amount: -333)
|
||||
|
||||
snapshot = @family.snapshot_transactions
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue