Skip to content

Commit

Permalink
set error expectation to v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Nov 3, 2023
1 parent 08809e4 commit d75885a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/testthat/test-read_camtrap_dp.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ test_that("file can be an URL", {
class(dp$data$observations)))
})

test_that("only DP versions 1.0-rc.1 and dp 0.1.6 are supported", {
test_that("only DP versions 1.0 and dp 0.1.6 are supported", {
expect_error(
suppressMessages(read_camtrap_dp("https://raw.githubusercontent.com/tdwg/camtrap-dp/bb046c85a55bef2ced709357c0047f0136df8326/example/datapackage.json")),
"Version https://raw.githubusercontent.com/tdwg/camtrap-dp/0.5/camtrap-dp-profile.json is not supported. Supported versions: 0.1.6 and 1.0-rc.1."
"Version https://raw.githubusercontent.com/tdwg/camtrap-dp/0.5/camtrap-dp-profile.json is not supported. Supported versions: 0.1.6 and 1.0.",
fixed = TRUE
)

expect_error(
suppressMessages(read_camtrap_dp("https://raw.githubusercontent.com/tdwg/dwc-for-biologging/403f57db105982dc05b70f3cf66fd2b5591798db/derived/camtrap-dp/data/raw/datapackage.json")),
"Version tabular-data-package is not supported. Supported versions: 0.1.6 and 1.0-rc.1."
"Version tabular-data-package is not supported. Supported versions: 0.1.6 and 1.0",
fixed = TRUE
)
})

Expand Down

0 comments on commit d75885a

Please sign in to comment.