mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 07:39:39 +02:00
Fix income summary totals (#759)
This commit is contained in:
parent
0d0f766ca1
commit
ac46c0c5a9
2 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,14 @@
|
|||
require "test_helper"
|
||||
|
||||
class TransactionTest < ActiveSupport::TestCase
|
||||
# See: https://github.com/maybe-finance/maybe/wiki/vision#signage-of-money
|
||||
test "negative amounts are inflows, positive amounts are outflows to an account" do
|
||||
inflow_transaction = transactions(:checking_four)
|
||||
outflow_transaction = transactions(:checking_five)
|
||||
|
||||
assert inflow_transaction.amount < 0
|
||||
assert outflow_transaction.amount >= 0
|
||||
assert Transaction.inflows.include? inflow_transaction
|
||||
assert Transaction.outflows.include? outflow_transaction
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue