Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix broken tests #1120

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/testthat/test-with_opt.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ test_that(
with_dir(
path_dummy_golem,
{
skip_if_not(exists("run_app"))

# 0. Make dummy golem work as pkg temporarily i.e. run_app() is known
devtools::load_all()
# 1. Test the maintenance feature directly
html <- maintenance_page()
expect_true(inherits(html, c("html_document", "shiny.tag.list", "list")))
Expand Down Expand Up @@ -51,7 +51,8 @@ test_that(
with_dir(
path_dummy_golem,
{
skip_if_not(exists("run_app"))
# 0. Make dummy golem work as pkg temporarily i.e. run_app() is known
devtools::load_all()
# I. Test disabling the 'print'-flag on Posit for SHINY_PORT set
# I.A save output with "print = FALSE" as the testing value
app_print_false <- run_app()
Expand Down Expand Up @@ -158,7 +159,7 @@ test_that(
)
# II. reset global variable and check that this reset is successful
assignInNamespace(".globals", tmp_globals_backup, ns = "shiny")
expect_null(getShinyOption("golem_options"))
expect_null(shiny::getShinyOption("golem_options"))
expect_null(get_golem_options())
}
)
Expand Down