1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

Fix price sync

This commit is contained in:
Zach Gollwitzer 2025-05-12 10:49:33 -04:00
parent 0fbafceea9
commit 7988ab64cc
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ class MarketDataSyncer
Rails.logger.info("Syncing security price for: #{security.ticker}, start_date: #{start_date}, end_date: #{end_date}")
fetched_prices = price_provider.fetch_security_prices(
security.ticker,
security,
start_date: start_date,
end_date: end_date
)

View file

@ -54,7 +54,7 @@ class MarketDataSyncerTest < ActiveSupport::TestCase
end_date = Date.current.in_time_zone("America/New_York").to_date
mock_provider.expects(:fetch_security_prices)
.with("AAPL", start_date: start_date, end_date: end_date)
.with(aapl, start_date: start_date, end_date: end_date)
.returns(provider_success_response([ OpenStruct.new(security: aapl, date: start_date, price: 100, currency: "USD") ]))
assert_difference "Security::Price.count", 1 do