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

Fix unit test failures introduced by #3385 #3652

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion R/bookmark-state.R
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ RestoreContext <- R6Class("RestoreContext",
safeFromJSON(value),
error = function(e) {
varsUnparsed <<- c(varsUnparsed, name)
message("Failed to parse URL parameter \"", name, "\"")
warning("Failed to parse URL parameter \"", name, "\"")
}
)
}
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-bookmarking.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ test_that("Inputs and values in query string", {
suppress_stacktrace(expect_warning(expect_warning(RestoreContext$new("?_inputs_&a=1&_inputs_&b=2"))))
suppress_stacktrace(expect_warning(expect_warning(RestoreContext$new("?_inputs_&a=1&_values_&b=2&_inputs_&"))))
suppress_stacktrace(expect_warning(expect_warning(RestoreContext$new("?_values_&a=1&_values_"))))
suppress_stacktrace(expect_warning(expect_warning(RestoreContext$new("?_inputs_&a=1&_values_&_values&b=2"))))
suppress_stacktrace(expect_warning(RestoreContext$new("?_inputs_&a=1&_values_&_values&b=2")))

# If there's an error in the conversion from query string, should have
# blank values.
suppress_stacktrace(expect_warning(expect_warning(rc <- RestoreContext$new("?_inputs_&a=[x&b=1"))))
expect_identical(rc$input$asList(), list())
suppress_stacktrace(expect_warning(rc <- RestoreContext$new("?_inputs_&a=[x&b=1")))
expect_identical(rc$input$asList(), list(b=1L))
expect_identical(as.list(rc$values), list())
expect_identical(rc$dir, NULL)

Expand Down