From 07e2426cbe280caadebafe18cddad396b5e17dcd Mon Sep 17 00:00:00 2001 From: Eric Scott Date: Tue, 12 Dec 2023 11:09:17 -0700 Subject: [PATCH] relax test for most recent hourly data --- tests/testthat/test-az_hourly.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-az_hourly.R b/tests/testthat/test-az_hourly.R index 8cef86e..6cd7544 100644 --- a/tests/testthat/test-az_hourly.R +++ b/tests/testthat/test-az_hourly.R @@ -61,7 +61,8 @@ test_that("start=NULL, end=NULL works as expected", { }, glue::glue("Querying most recent hour of data")) expect_equal(nrow(null_null), 1) - expect_equal(null_null$date_datetime, latest_hour) + #could be that current hour hasn't hit API yet. + expect_in(null_null$date_datetime, c(latest_hour, latest_hour - hours(1))) }) test_that("end=NULL works as expected", {