Skip to content

Commit

Permalink
test: special case
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Nov 4, 2024
1 parent c12f039 commit f3f4ce6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/testthat/test-render.R
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,34 @@ test_that("render_website() works - all language links are present in navbar", {

})



test_that("render_website() works - all language links are present in navbar", {
# https://github.com/ropensci-review-tools/babelquarto/issues/84
parent_dir <- withr::local_tempdir()
project_dir <- "blop"

quarto_multilingual_website(
parent_dir = parent_dir,
project_dir = project_dir,
further_languages = c("es", "fr"),
main_language = "en",
site_url = "https://ropensci.org"
)

file.create(file.path(parent_dir, project_dir, "practices.qmd"))
file.create(file.path(parent_dir, project_dir, "practices.es.qmd"))

withr::local_envvar(BABELQUARTO_CI_URL = "https://ropensci.org")
withr::with_dir(parent_dir, render_website(project_dir))

expect_file_exists(
file.path(parent_dir, project_dir, "_site", "es", "practices.html")
)

})


test_that("render_website() works - sidebar in language profile", {
parent_dir <- withr::local_tempdir()
project_dir <- "blop"
Expand Down

0 comments on commit f3f4ce6

Please sign in to comment.