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:
parent
ef4be7948a
commit
7c2091b343
37 changed files with 582 additions and 86 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue