tests/testthat/test-formatarticleurl.R

context("formatarticleurl")

skip_on_cran()
skip_if_offline()

test_that("formatarticleurl returns the correct value", {
	expect_that(formatarticleurl("10.1371/journal.pone.0004045", 'PLoSONE'),
							equals("http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0004045"))
})

test_that("formatarticleurl returns the correct class", {
	expect_that(formatarticleurl("10.1371/journal.pone.0004045", 'PLoSONE'), is_a("character"))
})
ropensci/rplos documentation built on Sept. 12, 2022, 2:10 p.m.