Skip to content

Commit

Permalink
test(census_geo_api_names): add test with ZCTA for 2010
Browse files Browse the repository at this point in the history
  • Loading branch information
rossellhayes committed Apr 2, 2024
1 parent c18eb4f commit 76953c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/test-get_census_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
})
}

0 comments on commit 76953c2

Please sign in to comment.