Skip to content

Commit

Permalink
fix nassqs_param_values() error and associated test.
Browse files Browse the repository at this point in the history
  • Loading branch information
potterzot committed Oct 30, 2019
1 parent 9beeabc commit 2da1dde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/params.R
Expand Up @@ -137,7 +137,7 @@ nassqs_param_values <- function(param, ...) {
res <- nassqs_parse(nassqs_GET(params, api_path = "get_param_values"), as = "list")[[1]]
} else {
d <- nassqs(...)
res <- sort(unique(d[["param"]]))
res <- sort(unique(d[[param]]))
}
res
}
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-params.R
Expand Up @@ -33,8 +33,7 @@ with_authentication({
test_that("nassqs_param_values returns parameter values filtered for other parameters", {
v = nassqs_param_values(param = "source_desc", year = 2012, county_name = "YAKIMA",
group_desc = "EXPENSES", sector_desc = "DEMOGRAPHICS")
expect_equal(nassqs_param_values("source_desc"), c("CENSUS", "SURVEY"))
expect_equal(nassqs_param_values("SOURCE_DESC"), c("CENSUS", "SURVEY"))
expect_equal(v, c("CENSUS"))
})

})
Expand Down

0 comments on commit 2da1dde

Please sign in to comment.