1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-25 08:09:38 +02:00

Feature: Add "amount type" configuration column for CSV imports (#1947)

* Rough draft

* Schema conflict update

* Implement signage

* Update system tests

* Lint fixes
This commit is contained in:
Zach Gollwitzer 2025-04-18 10:48:10 -04:00 committed by GitHub
parent 8cf077f28d
commit c88fe2e3b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 366 additions and 83 deletions

View file

@ -36,6 +36,7 @@ class TradeImportTest < ActiveSupport::TestCase
CSV
@import.update!(
account: accounts(:depository),
raw_file_str: import,
date_col_label: "date",
ticker_col_label: "ticker",
@ -52,16 +53,11 @@ class TradeImportTest < ActiveSupport::TestCase
@import.reload
assert_difference [
-> { Entry.count },
-> { Trade.count }
], 2 do
assert_difference [
-> { Security.count },
-> { Account.count }
], 1 do
@import.publish
end
assert_difference -> { Entry.count } => 2,
-> { Trade.count } => 2,
-> { Security.count } => 1,
-> { Account.count } => 1 do
@import.publish
end
assert_equal "complete", @import.status