diff --git a/tests/testthat/test_preprocess_ww_data.R b/tests/testthat/test_preprocess_ww_data.R index 2b0b7d5b..5e60f2b6 100644 --- a/tests/testthat/test_preprocess_ww_data.R +++ b/tests/testthat/test_preprocess_ww_data.R @@ -381,12 +381,15 @@ test_that("Function handles LOD values equal to concentration values", { }) test_that("Constant population per site", { - wrong_pop <- ww_data - ww_data$site_pop <- 1e6 + seq_len(nrow(ww_data)) + wrong_pop <- cbind( + ww_data, + ww_data |> dplyr::mutate(site = max(.data$site) + 1) + ) + wrong_pop$site_pop <- 1e6 + seq_len(nrow(ww_data)) expect_error( preprocess_ww_data( - ww_data, + wrong_pop, conc_col_name = "conc", lod_col_name = "lod" ),