tests/testthat/test-get_citation.R

test_that("expected behavior", {
  vcr::use_cassette(name = "get_citation", {
    ref <- get_citation(get_network_by_id(18))
    netws <- get_collection(search_networks("lagoon"))
    ref2 <- get_citation(netws)
  })
  expect_equal(length(ref), 1)
  expect_equal(length(ref2), 2)
  expect_true(grepl("^@article", ref))
  expect_true(grepl("^@article", ref2[1]))
  expect_true(grepl("^@book", ref2[2]))
})
mangal-wg/rmangal documentation built on Jan. 15, 2024, 10:23 p.m.