Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

364 B
Raw Blame
module SecuritiesTestHelper
  def create_security(ticker, prices:)
    security = Security.create!(
      ticker: ticker,
      exchange_mic: "XNAS"
    )

    prices.each do |price|
      Security::Price.create!(
        security: security,
        date: price[:date],
        price: price[:price],
        currency: "USD"
      )
    end

    security
  end
end