Skip to content

Commit

Permalink
wrap qs test in skip if not install
Browse files Browse the repository at this point in the history
  • Loading branch information
tanho63 committed Aug 10, 2023
1 parent 91a6d3b commit 16563fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/testthat/test-from_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ test_that("from_url fails nicely", {
)

expect_warning(
qs_from_url("https://asfdjklasfsadffasd.com"),
regexp = "Failed to retrieve data"
raw_from_url("https://github.com/nflverse/nfl/blob/master/data/games.rd"),
regexp = "HTTP error"
)

skip_if_not_installed("qs")
expect_warning(
raw_from_url("https://github.com/nflverse/nfl/blob/master/data/games.rd"),
regexp = "HTTP error"
qs_from_url("https://asfdjklasfsadffasd.com"),
regexp = "Failed to retrieve data"
)

})
Expand Down

0 comments on commit 16563fe

Please sign in to comment.