mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
Add security prices provider (Synth integration) (#1039)
* User tickers as primary lookup symbol instead of isin * Add security price provider * Fetch security prices in bulk to improve sync performance * Fetch prices in bulk, better mocking for tests
This commit is contained in:
parent
c70c8b6d86
commit
453a54e5e6
33 changed files with 584 additions and 118 deletions
|
@ -93,8 +93,10 @@ class Account::Balance::SyncerTest < ActiveSupport::TestCase
|
|||
|
||||
syncer = Account::Balance::Syncer.new(@account)
|
||||
|
||||
assert_raises Money::ConversionError do
|
||||
syncer.run
|
||||
with_env_overrides SYNTH_API_KEY: nil do
|
||||
assert_raises Money::ConversionError do
|
||||
syncer.run
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +106,10 @@ class Account::Balance::SyncerTest < ActiveSupport::TestCase
|
|||
@account.update! currency: "EUR"
|
||||
|
||||
syncer = Account::Balance::Syncer.new(@account)
|
||||
syncer.run
|
||||
|
||||
with_env_overrides SYNTH_API_KEY: nil do
|
||||
syncer.run
|
||||
end
|
||||
|
||||
assert_equal 1, syncer.warnings.count
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue