Skip to content

Commit

Permalink
Update test-get_sri_hash_deps.R
Browse files Browse the repository at this point in the history
  • Loading branch information
b-rodrigues authored Jan 9, 2025
1 parent 879d8d0 commit 0959e02
Showing 1 changed file with 3 additions and 32 deletions.
35 changes: 3 additions & 32 deletions tests/testthat/test-get_sri_hash_deps.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
testthat::test_that("get_sri_hash_deps returns correct sri hash and dependencies of R packages, locally", {

# only run this one locally
skip_if_not(nix_shell_available())

testthat::test_that("get_sri_hash_deps returns correct sri hash and dependencies of R packages", {

testthat::skip_on_cran()

testthat::expect_equal(
Expand All @@ -18,34 +15,8 @@ testthat::test_that("get_sri_hash_deps returns correct sri hash and dependencies
"dplyr", "ggplot2", "janitor", "purrr",
"readxl", "rlang", "rvest", "stringr", "tidyr"
),
"remotes" = NULL
"remotes" = list()
)
)
)
})

testthat::test_that("get_sri_hash_deps returns correct sri hash and dependencies of R packages, online", {

# only run this one if the shell is not available, running it through the api
!skip_if_not(nix_shell_available())

testthat::skip_on_cran()

testthat::expect_equal(
get_sri_hash_deps(
"https://github.com/rap4all/housing/",
"1c860959310b80e67c41f7bbdc3e84cef00df18e"
),
list(
"sri_hash" = "sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=",
"deps" = list(
"package" = "housing",
"imports" = c(
"dplyr", "ggplot2", "janitor", "purrr",
"readxl", "rlang", "rvest", "stringr", "tidyr"
),
"remotes" = list()
)
)
)
})

0 comments on commit 0959e02

Please sign in to comment.