From 76953c2045974f6331213424ece4bf4464521d12 Mon Sep 17 00:00:00 2001 From: Alexander Rossell Hayes Date: Mon, 1 Apr 2024 21:07:20 -0700 Subject: [PATCH] test(census_geo_api_names): add test with ZCTA for 2010 --- tests/testthat/test-get_census_data.R | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/testthat/test-get_census_data.R b/tests/testthat/test-get_census_data.R index f43eece..598890e 100644 --- a/tests/testthat/test-get_census_data.R +++ b/tests/testthat/test-get_census_data.R @@ -67,5 +67,14 @@ if(Sys.getenv("CENSUS_API_KEY") != "") { )) expect_named(r$DC, c("state", "age", "sex", "year", "zcta")) expect_true(all(r$DC$zcta$state == "DC")) + + r <- suppressMessages(get_census_data( + key = NULL, + state = "DC", + census.geo = "zcta", + year = "2010" + )) + expect_named(r$DC, c("state", "age", "sex", "year", "zcta")) + expect_true(all(r$DC$zcta$state == "DC")) }) }