Skip to content

Commit 17a369c

Browse files
committed
test: add environment variable test
1 parent 24bda52 commit 17a369c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/testthat/test-methods-epi_archive.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ test_that("filter.epi_archive works as expected", {
189189
expect_equal(intcustom_week_ea$geo_type, "custom")
190190
expect_equal(intcustom_week_ea$time_type, "week")
191191

192+
# Environment variables should be fine:
193+
version <- as.Date("2020-06-02") + 1
194+
expect_no_error(ea2 %>% filter(geo_value == "ca", .env$version <= time_value))
195+
192196
# Error-raising:
193197
expect_error(
194198
ea2 %>% filter(version == as.Date("2020-06-02")),

0 commit comments

Comments
 (0)