1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Fix broken tests

This commit is contained in:
Zach Gollwitzer 2025-03-07 18:39:13 -05:00
parent 125368af29
commit 2c3656cf17

View file

@ -33,7 +33,7 @@ class Security::PriceTest < ActiveSupport::TestCase
tomorrow = Date.current + 1.day
@provider.expects(:fetch_security_prices)
.with(ticker: security.ticker, mic_code: security.exchange_mic, start_date: tomorrow, end_date: tomorrow)
.with(ticker: security.ticker, mic_code: security.exchange_operating_mic, start_date: tomorrow, end_date: tomorrow)
.once
.returns(
OpenStruct.new(
@ -54,7 +54,7 @@ class Security::PriceTest < ActiveSupport::TestCase
Security::Price.delete_all # Clear any existing prices
@provider.expects(:fetch_security_prices)
.with(ticker: security.ticker, mic_code: security.exchange_mic, start_date: Date.current, end_date: Date.current)
.with(ticker: security.ticker, mic_code: security.exchange_operating_mic, start_date: Date.current, end_date: Date.current)
.once
.returns(OpenStruct.new(success?: false))
@ -91,7 +91,7 @@ class Security::PriceTest < ActiveSupport::TestCase
@provider.expects(:fetch_security_prices)
.with(ticker: security.ticker,
mic_code: security.exchange_mic,
mic_code: security.exchange_operating_mic,
start_date: 2.days.ago.to_date,
end_date: 2.days.ago.to_date)
.returns(OpenStruct.new(success?: true, prices: [ { date: 2.days.ago.to_date, price: missing_price, currency: "USD" } ]))