tests/testthat/test-get_prices.R

test_that("get_prices works", {
  ticker <- sample(rfinance::get_sp500(), 1) # Get a random ticker
  prices <- rfinance::get_prices(ticker)
  testthat::expect_that(prices, testthat::is_a("data.frame"))
})
aljrico/rfinance documentation built on March 29, 2024, 2:31 a.m.