mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
fix: loan transfer kind assignment to use destination account (#874)
* fix: loan transfer kind assignment to use destination account * fix: update system test to use depository account instead of investment account
This commit is contained in:
@@ -201,10 +201,11 @@ class TransactionsTest < ApplicationSystemTestCase
|
||||
end
|
||||
|
||||
test "transfers should always sum to zero" do
|
||||
# Use two accounts that result in funds_movement kind (not investment/crypto which become investment_contribution)
|
||||
asset_account = accounts(:other_asset)
|
||||
investment_account = accounts(:investment)
|
||||
depository_account = accounts(:depository)
|
||||
outflow_entry = create_transaction("outflow", Date.current, 500, account: asset_account)
|
||||
inflow_entry = create_transaction("inflow", 1.day.ago.to_date, -500, account: investment_account)
|
||||
inflow_entry = create_transaction("inflow", 1.day.ago.to_date, -500, account: depository_account)
|
||||
@user.family.auto_match_transfers!
|
||||
visit transactions_url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user