Skip to content

Commit

Permalink
dl data for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsta committed Mar 23, 2020
1 parent afb5916 commit 55dd881
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/testthat/test-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ test_that("info functions work", {
expect_equal(length(res$iteminfo$name),
12)

nhd_get("DC")
res <- nhd_info("DC", "NHDWaterbody")
expect_equal(length(res$iteminfo$name),
13)

# works with dbf layers
nhd_plus_get(1, "NHDPlusAttributes")
expect_equal(
class(nhd_plus_info(vpu = 1, component = "NHDPlusAttributes", dsn = "PlusFlow")),
"table")
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-list.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ test_that("list functions work", {
expect_equal(class(nhd_plus_list(vpu = 4, component = "NHDPlusAttributes")),
"character")

nhd_plus_get(vpu = "National", component = "V1_To_V2_Crosswalk")
expect_equal(length(nhd_plus_list(vpu = "National",
component = "V1_To_V2_Crosswalk")),
1)

expect_true(length(nhd_plus_list(vpu = 4, file_ext = "shp")) <
length(short_list))

expect_equal(length(nhd_list("MI")), 29)
nhd_get("DC")
expect_equal(length(nhd_list("DC")), 29)
})

0 comments on commit 55dd881

Please sign in to comment.