tests/testthat/test-licenses.R

test_that("Accepted licences can be obtained", {
  skip_on_cran()
  skip_if_offline()
  skip_if_not(cds_token_works())
  expect_no_error({
    cds_accepted_licences()
  })
})

test_that("A license can be accepted", {
  skip_on_cran()
  skip_if_offline()
  skip_if_not(cds_token_works())
  expect_no_error({
    cds_accept_licence("cc-by", 1)
  })
})

test_that("Licenses can be listed", {
  skip_on_cran()
  skip_if_offline()
  expect_true({
    nrow(cds_list_licences()) > 10
  })
})

Try the CopernicusClimate package in your browser

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

CopernicusClimate documentation built on Jan. 8, 2026, 1:08 a.m.