From 5e0902c389d3f8f6c3a2361479863818f27710f2 Mon Sep 17 00:00:00 2001 From: BaptisteBR Date: Fri, 6 Sep 2024 09:42:24 +0100 Subject: [PATCH] Update tests/testthat/test-utils_get_data.R Co-authored-by: Milan Malfait <38256462+milanmlft@users.noreply.github.com> --- tests/testthat/test-utils_get_data.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-utils_get_data.R b/tests/testthat/test-utils_get_data.R index 974d4c7..d021980 100644 --- a/tests/testthat/test-utils_get_data.R +++ b/tests/testthat/test-utils_get_data.R @@ -75,8 +75,8 @@ test_that("Test low frequency stats replacement for monthly counts", { ) replacement <- as.double(Sys.getenv("LOW_FREQUENCY_REPLACEMENT")) results <- .manage_low_frequency(mock_monthly_counts) - expect_true(nrow(results) == 4) - expect_true(nrow(dplyr::filter(results, person_count == 0)) == 0) + expect_equal(nrow(results), 4) + expect_equal(sum(results$person_count == 0), 0) expect_true(nrow(dplyr::filter(results, person_count == 1)) == 0) expect_true(nrow(dplyr::filter(results, person_count == replacement)) == 2) expect_true(nrow(dplyr::filter(results, person_count == 1000)) == 2)