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

library(GetDFPData2)
library(testthat)

skip_on_cran()
skip_if_offline()

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

my_temp_folder <- fs::path_temp("getdfpdata2-cache-infocompanies")
fs::dir_create(my_temp_folder)

test_that("Get info companies (no cache)", {
  df_info <- get_info_companies(my_temp_folder )

  test_info(df_info)

})

test_that("Get info companies (with cache)", {
  df_info <- get_info_companies(my_temp_folder )

  test_info(df_info)

})

Try the GetDFPData2 package in your browser

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

GetDFPData2 documentation built on April 25, 2023, 5:11 p.m.