Skip to content

Commit

Permalink
add test_elevation httptest2 files for #272
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Jun 1, 2022
1 parent 2e699ca commit a973948
Show file tree
Hide file tree
Showing 6 changed files with 3,434 additions and 3 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: osmdata
Title: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects
Version: 0.1.9.013
Version: 0.1.9.014
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")),
person("Bob", "Rudis", role = "aut"),
Expand Down Expand Up @@ -40,6 +40,7 @@ Imports:
utils,
xml2
Suggests:
httptest,
knitr,
markdown,
raster,
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/ropensci/osmdata/",
"issueTracker": "https://github.com/ropensci/osmdata/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.9.013",
"version": "0.1.9.014",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
1 change: 1 addition & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
library(testthat)
library(httptest2)
library(osmdata)

test_check("osmdata")
4 changes: 3 additions & 1 deletion tests/testthat/test-elevation.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ test_that ("osmdata_sc", {
add_osm_feature (key = "highway")

f <- file.path (tempdir (), "junk.osm")
doc <- osmdata_xml (qry, file = f)
doc <- with_mock_dir ("test_elevation", {
osmdata_xml (qry, file = f)
})
expect_silent (x <- osmdata_sc (qry, doc = f))
expect_true (file.exists (f))

Expand Down
Loading

0 comments on commit a973948

Please sign in to comment.