tests/testthat/test-metadata.R

test_that("Correct licence URL is found", {
  expect_null(creative_commons_url(NULL))
  expect_equal(creative_commons_url("CC0"), "https://creativecommons.org/publicdomain/zero/1.0/")
  expect_equal(creative_commons_url("CC BY-NC-SA"), "https://creativecommons.org/licenses/by-nc-sa/4.0/")
})

Try the distill package in your browser

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

distill documentation built on Oct. 6, 2023, 5:06 p.m.