Skip to content

Commit

Permalink
fix fill_empty_dates_with_na test
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Feb 4, 2022
1 parent 2e98e5e commit d75476b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/testthat/test-processing.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ test_that("fill_empty_dates_with_na fills empty dates with NA", {
# with NA in cases)
expected_data <- expected_data %>%
dplyr::group_by(, level_1_region, level_1_region_code)

partial_data <- expected_data[-c(6:9), ]
expect_equal(fill_empty_dates_with_na(partial_data), expected_data)
expect_equal(
fill_empty_dates_with_na(partial_data),
dplyr::arrange(expected_data, level_1_region, date)
)
expected_data <- dplyr::mutate(
expected_data,
level_2_region = level_1_region,
Expand All @@ -95,7 +98,10 @@ test_that("fill_empty_dates_with_na fills empty dates with NA", {
level_1_region, level_1_region_code, cases
)
partial_data <- expected_data[-c(6:9), ]
expect_equal(fill_empty_dates_with_na(partial_data), expected_data)
expect_equal(
fill_empty_dates_with_na(partial_data),
dplyr::arrange(expected_data, level_1_region, date)
)
})

test_that("complete_cumulative_columns works", {
Expand Down

0 comments on commit d75476b

Please sign in to comment.