tests/testthat/test-ubci_get_options.R

context("test-ubci_get_options")

test_that("crypto chk", {
  tem <- ubci_get_options()
  expect_equal(tem$code[1], "UPBIT.KRW-BTC")
})

test_that("get colume chk", {
  tem <- ubci_get_options()
  col <- c("code","name","exchange","tradeStatus", "marketState")
  expect_equal(names(tem), col)
})

test_that("lang ko chk", {
  tem <- ubci_get_options("ko")
  expect_equal(nchar(tem$name[1]), 4)
})

Try the ubci package in your browser

Any scripts or data that you put into this service are public.

ubci documentation built on June 11, 2019, 1:02 a.m.