tests/testthat/test-get-info-companies.R

cache_folder <- tempdir()

test_info <- function(df_in) {
  expect_true(nrow(df_in) > 0)
  expect_true(ncol(df_in) > 0)
}

test_that('fetching info companies (no cache)', {

  skip_on_cran()
  skip_if_offline()

  my_info <- get_info_companies(cache_folder = cache_folder)

  test_info(my_info)

})

test_that('fetching info companies (with cache)', {

  skip_on_cran()
  skip_if_offline()

  my_info <- get_info_companies(cache_folder = cache_folder)

  test_info(my_info)

})

Try the GetFREData package in your browser

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

GetFREData documentation built on June 13, 2022, 5:08 p.m.