Skip to content

Commit

Permalink
work on unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlindblad committed Nov 14, 2023
1 parent 9d2a4cb commit 42a8e2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.4.0
Date: 2023-11-13 18:44:51 UTC
SHA: 9d2a4cbc3c9372a74d115d52dba5a2519222cae6
2 changes: 1 addition & 1 deletion R/get_proverbs.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ping_esv <- function() {
`include-short-copyright` = FALSE,
`include-passage-references` = FALSE
) |>
httr2::req_headers(`Authorization` = paste0("Token ", API_KEY)) |>
httr2::req_headers(`Authorization` = glue::glue("Token { API_KEY }")) |>
httr2::req_error(body = check_esv_error) |>
httr2::req_perform()

Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/test-proverb.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ test_that("rccv works", {

})

test_that("esv works", {
testthat::skip_on_cran()
expect_output(proverb("esv"))

})

test_that("give bad translation", {
testthat::skip_on_cran()
expect_error(proverb("foo"))
Expand All @@ -54,3 +60,5 @@ test_that("give bad accent color", {
expect_error(proverb(accent_color = "bro"))

})


0 comments on commit 42a8e2d

Please sign in to comment.