1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00

Improve account transaction, trade, and valuation editing and sync experience (#1506)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled

* Consolidate entry controller logic

* Transaction builder

* Update trades controller to use new params

* Load account charts in turbo frames, fix PG overflow

* Consolidate tests

* Tests passing

* Remove unused code

* Add client side trade form validations
This commit is contained in:
Zach Gollwitzer 2024-11-27 16:01:50 -05:00 committed by GitHub
parent 76f2714006
commit c3248cd796
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 1103 additions and 1159 deletions

View file

@ -8,12 +8,12 @@ class Account::HoldingsControllerTest < ActionDispatch::IntegrationTest
end
test "gets holdings" do
get account_holdings_url(@account)
get account_holdings_url(account_id: @account.id)
assert_response :success
end
test "gets holding" do
get account_holding_path(@account, @holding)
get account_holding_path(@holding)
assert_response :success
end
@ -21,10 +21,10 @@ class Account::HoldingsControllerTest < ActionDispatch::IntegrationTest
test "destroys holding and associated entries" do
assert_difference -> { Account::Holding.count } => -1,
-> { Account::Entry.count } => -1 do
delete account_holding_path(@account, @holding)
delete account_holding_path(@holding)
end
assert_redirected_to account_holdings_path(@account)
assert_empty @account.entries.where(entryable: @account.trades.where(security: @holding.security))
assert_redirected_to account_path(@holding.account)
assert_empty @holding.account.entries.where(entryable: @holding.account.trades.where(security: @holding.security))
end
end