1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Format money for trade history in holdings drawer (#1961)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled

* Format money for trade history in holdings drawer

* Fix broken tests

* Lint fix
This commit is contained in:
Zach Gollwitzer 2025-03-07 19:09:54 -05:00 committed by GitHub
parent 86bf47a32e
commit a3cd5f4f1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 7 deletions

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" } ]))