1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00
Maybe/test/support/securities_test_helper.rb
Zach Gollwitzer 453a54e5e6
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
2024-08-01 19:43:23 -04:00

9 lines
236 B
Ruby

module SecuritiesTestHelper
def create_security(ticker, prices:)
prices.each do |price|
Security::Price.create! ticker: ticker, date: price[:date], price: price[:price]
end
Security.create! ticker: ticker
end
end