mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Create tagging system (#792)
* Repro * Fix * Update signage * Create tagging system * Add tags to transaction imports * Build tagging UI * Cleanup * More cleanup
This commit is contained in:
parent
41c991384a
commit
457247da8e
38 changed files with 607 additions and 90 deletions
|
@ -5,7 +5,9 @@ class ImportTest < ActiveSupport::TestCase
|
|||
|
||||
setup do
|
||||
@empty_import = imports(:empty_import)
|
||||
@loaded_import = imports(:loaded_import)
|
||||
|
||||
@loaded_import = @empty_import.dup
|
||||
@loaded_import.update! raw_csv_str: valid_csv_str
|
||||
end
|
||||
|
||||
test "raw csv input must conform to csv spec" do
|
||||
|
@ -42,7 +44,11 @@ class ImportTest < ActiveSupport::TestCase
|
|||
# Import has 3 unique categories: "Food & Drink", "Income", and "Shopping" (x2)
|
||||
# Fixtures already define "Food & Drink" and "Income", so these should not be created
|
||||
# "Shopping" is a new category, but should only be created 1x during import
|
||||
assert_difference -> { Transaction.count } => 4, -> { Transaction::Category.count } => 1 do
|
||||
assert_difference \
|
||||
-> { Transaction.count } => 4,
|
||||
-> { Transaction::Category.count } => 1,
|
||||
-> { Tagging.count } => 4,
|
||||
-> { Tag.count } => 2 do
|
||||
@loaded_import.publish
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue