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"))
})

Try the rplos package in your browser

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

rplos documentation built on Feb. 24, 2021, 1:06 a.m.