tests/testthat/test-fx-quote.R

test_that("can get a fx quote", {
  skip_if_no_token()

  x <- riingo_fx_quote(c("audusd", "jpyusd"))

  cols <- c(
    "index", "quoteTimestamp", "bidPrice", "bidSize",
    "askPrice", "askSize", "midPrice"
  )

  expect_true(all(cols %in% names(x)))
})
business-science/riingo documentation built on Sept. 16, 2020, 4:39 p.m.