Skip to content

Commit

Permalink
provide an artificial datetime for the flaking wrapper test
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jul 12, 2023
1 parent 757a6b5 commit ffcf332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions R/expect-wrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ expect_wrapper <- function(
return(invisible())
}

# set artificial datetimeCreate date to avoid crashes due to the second
wb$datetimeCreated <- "2000-01-01 00:00:00 CEST"

if (!is.null(params)) {
# create now so that it's the same every time
wb_fun <- wb$clone(deep = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-class-workbook-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ test_that("wb_set_creators() is a wrapper", {

test_that("wb_remove_creators() is a wrapper", {
wb <- wb_workbook(creator = "myself")
expect_wrapper("remove_creators", params = list(creators = "myself"))
expect_wrapper("remove_creators", wb = wb, params = list(creators = "myself"))
})

# wb_page_setup() -------------------------------------------------------------
Expand Down

0 comments on commit ffcf332

Please sign in to comment.