Skip to content

Commit

Permalink
Check that it's _our_ error that fires (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemahoney218 authored Apr 13, 2024
1 parent 695bff6 commit b005b9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/testthat/test-get_stac_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ test_that("Providing pixel sizes with geographic coords fires the expected warni
expect_error(
tryCatch(
get_stac_data(aoi, pixel_x_size = 30, pixel_y_size = 30),
rsi_default_pixel_size_geographic_coords = stop("The warning fired")
)
rsi_default_pixel_size_geographic_coords = rlang::abort("The warning fired", class = "success")
),
class = "success"
)
})

Expand All @@ -379,7 +380,8 @@ test_that("Providing no asset names fires the expected warning", {
collection = "usgs-lcmap-conus-v13",
output_filename = tempfile(fileext = ".tif"),
),
rsi_missing_asset_names = stop("The warning fired")
rsi_missing_asset_names = rlang::abort("The warning fired", class = "success"),
class = "success"
)
)
})

0 comments on commit b005b9b

Please sign in to comment.