tests/testthat/test-fix_publisher.R

test_that("fix_publisher() works", {
  expect_equal(fix_publisher(publishers = "publisher"), "publisher")
  expect_equal(fix_publisher(publishers = NULL), ":unas")
  expect_equal(
    fix_publisher(publishers = person("Jane", "Doe", role = "pbl")),
    "Jane Doe"
  )
  expect_equal(fix_publisher(publishers = person("American Iris Society", role = "pbl")), "American Iris Society")
  expect_equal(fix_publisher(publishers = c(
    person("Jane", "Doe", role = "pbl"),
    person("American Iris Society")
  )), "{Jane Doe} and {American Iris Society}")
})

Try the dataset package in your browser

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

dataset documentation built on June 8, 2025, 10:15 a.m.