Skip to content

Commit

Permalink
Make corrections to several testthat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Mar 30, 2019
1 parent 7dcffb0 commit e83e48e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-tab_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -650,14 +650,14 @@ test_that("the internal `opts_df` table can be correctly modified", {
expect_equal(c("4px", "3px"))

# Modify the `row.striping.include_stub` option
tbl_html <- data %>% tab_options(row.striping.include_stub = FALSE)
tbl_html <- data %>% tab_options(row.striping.include_stub = TRUE)

# Compare before and after values
c(opts_df_1 %>%
dplyr::filter(parameter == "row_striping_include_stub") %>% dplyr::pull(value),
attr(tbl_html, "opts_df", exact = TRUE) %>%
dplyr::filter(parameter == "row_striping_include_stub") %>% dplyr::pull(value)) %>%
expect_equal(c("TRUE", "FALSE"))
expect_equal(c("FALSE", "TRUE"))

# Modify the `row.striping.include_table_body` option
tbl_html <- data %>% tab_options(row.striping.include_table_body = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-util_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ test_that("the `get_css_tbl()` function works correctly", {

css_tbl %>% expect_is(c("tbl_df", "tbl", "data.frame"))

css_tbl %>% dim() %>% expect_equal(c(103, 4))
css_tbl %>% dim() %>% expect_equal(c(102, 4))

css_tbl %>%
colnames() %>%
Expand Down

0 comments on commit e83e48e

Please sign in to comment.