mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 14:54:49 +00:00
* 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
10 lines
236 B
Ruby
10 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
|