Skip to content

Commit

Permalink
be consistent in pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Jun 9, 2024
1 parent ee5c549 commit 5d75f94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/testthat/test-download_model.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
httptest2::with_mock_dir("download-model-success", {
test_that("we can successfully get existing model", {
expect_s3_class(download_model("lm_0", verbose = FALSE), "lm")
model <- download_model("lm_0", verbose = FALSE)
expect_s3_class(model, "lm")
})
})

httptest2::with_mock_dir("download-model-failure", {
test_that("we fail gracefully while getting non-existing model", {
expect_null(download_model("xyz", verbose = FALSE))
model <- download_model("xyz", verbose = FALSE)
expect_null(model)
})
})

Expand Down

0 comments on commit 5d75f94

Please sign in to comment.