swh:1:snp:bdc19e867479541d0f4994ceaa711217d0dc28ed
Tip revision: 74b598025322cd572dcd58326f0c5fb465f503ab authored by Hadley Wickham on 23 June 2022, 13:00:02 UTC
version 2.0.5
version 2.0.5
Tip revision: 74b5980
test-build-github.R
test_that("a CNAME record is built if a url exists in metadata", {
pkg <- local_pkgdown_site(test_path("assets/cname"))
dir_create(path(pkg$dst_path, "docs"))
expect_output(build_github_pages(pkg))
expect_equal(read_lines(path(pkg$dst_path, "CNAME")), "testpackage.r-lib.org")
})
test_that("CNAME URLs are valid", {
expect_equal(cname_url("http://google.com/"), "google.com")
expect_equal(cname_url("https://google.com/"), "google.com")
# this is not a valid URL because it has a trailing path
expect_null(cname_url("http://google.com/path/"))
})