mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Add reconciliation manager (#2459)
* Add reconciliation manager * Fix notes editing
This commit is contained in:
parent
89cc64418e
commit
52333e3fa6
11 changed files with 273 additions and 64 deletions
|
@ -8,7 +8,7 @@ class ValuationsControllerTest < ActionDispatch::IntegrationTest
|
|||
@entry = entries(:valuation)
|
||||
end
|
||||
|
||||
test "creates entry with basic attributes" do
|
||||
test "can create reconciliation" do
|
||||
account = accounts(:investment)
|
||||
|
||||
assert_difference [ "Entry.count", "Valuation.count" ], 1 do
|
||||
|
@ -35,8 +35,9 @@ class ValuationsControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_no_difference [ "Entry.count", "Valuation.count" ] do
|
||||
patch valuation_url(@entry), params: {
|
||||
entry: {
|
||||
amount: 20000,
|
||||
date: Date.current
|
||||
amount: 22000,
|
||||
date: Date.current,
|
||||
notes: "Test notes"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
@ -44,5 +45,9 @@ class ValuationsControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_enqueued_with job: SyncJob
|
||||
|
||||
assert_redirected_to account_url(@entry.account)
|
||||
|
||||
@entry.reload
|
||||
assert_equal 22000, @entry.amount
|
||||
assert_equal "Test notes", @entry.notes
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue