Skip to content

Commit

Permalink
add failing query test for #57
Browse files Browse the repository at this point in the history
  • Loading branch information
jsta committed Mar 27, 2019
1 parent b518a2c commit af6dc88
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/testthat/test-query.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@ test_that("nhd_plus_query fails well", {
buffer_dist = 0.1),
"nhd_plus_query only accepts a single lon-lat pair.")
})


test_that("nhd_plus_query handles mismatched column names.", {
skip_on_cran()
skip_on_travis()

# https://github.com/jsta/nhdR/issues/57
box <- st_bbox(c(xmin = -105.93003, xmax = -104.91784,
ymin = 40.41176, ymax = 41.21014),
crs = st_crs(4326)) %>%
st_as_sfc()

testthat::expect_success(
poudre_flow <- nhd_plus_query(poly = box,
dsn = c('NHDFlowLine'))
)

})

0 comments on commit af6dc88

Please sign in to comment.