1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Basic Portfolio Views (#1000)

* Add holdings tab to account view

* Basic portfolio UI

* Cleanup

* Handle missing holding data

* Remove synced at (implemented in separate pr)

* translations

* Tweak post sync streams

* Remove stale methods from merge conflict
This commit is contained in:
Zach Gollwitzer 2024-07-25 16:46:04 -04:00 committed by GitHub
parent ef4be7948a
commit 7c2091b343
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 582 additions and 86 deletions

View file

@ -37,11 +37,11 @@ class Account::Balance::SyncerTest < ActiveSupport::TestCase
test "syncs account with trades only" do
aapl = securities(:aapl)
create_trade(account: @investment_account, date: 1.day.ago.to_date, security: aapl, qty: 10, price: 200)
create_trade(aapl, account: @investment_account, date: 1.day.ago.to_date, qty: 10)
run_sync_for @investment_account
assert_equal [ 52000, 50000, 50000 ], @investment_account.balances.chronological.map(&:balance)
assert_equal [ 52140, 50000, 50000 ], @investment_account.balances.chronological.map(&:balance)
end
test "syncs account with valuations and transactions" do