Skip to content

Commit f3f4ce6

Browse files
committed
test: special case
1 parent c12f039 commit f3f4ce6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/testthat/test-render.R

+28
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,34 @@ test_that("render_website() works - all language links are present in navbar", {
659659

660660
})
661661

662+
663+
664+
test_that("render_website() works - all language links are present in navbar", {
665+
# https://github.com/ropensci-review-tools/babelquarto/issues/84
666+
parent_dir <- withr::local_tempdir()
667+
project_dir <- "blop"
668+
669+
quarto_multilingual_website(
670+
parent_dir = parent_dir,
671+
project_dir = project_dir,
672+
further_languages = c("es", "fr"),
673+
main_language = "en",
674+
site_url = "https://ropensci.org"
675+
)
676+
677+
file.create(file.path(parent_dir, project_dir, "practices.qmd"))
678+
file.create(file.path(parent_dir, project_dir, "practices.es.qmd"))
679+
680+
withr::local_envvar(BABELQUARTO_CI_URL = "https://ropensci.org")
681+
withr::with_dir(parent_dir, render_website(project_dir))
682+
683+
expect_file_exists(
684+
file.path(parent_dir, project_dir, "_site", "es", "practices.html")
685+
)
686+
687+
})
688+
689+
662690
test_that("render_website() works - sidebar in language profile", {
663691
parent_dir <- withr::local_tempdir()
664692
project_dir <- "blop"

0 commit comments

Comments
 (0)