Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Aug 30, 2024
1 parent 5d39a1e commit 8ee6591
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/helper-outpack-http.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mock_headers <- function(...) {
mock_response <- function(content, status = 200L, wrap = TRUE,
download = NULL) {
headers <- mock_headers()
if (inherits(content, "raw")) {
if (is.raw(content)) {
headers <- mock_headers("content-type" = "application/octet-stream")
} else if (inherits(content, "json")) {
headers <- mock_headers("content-type" = "application/json")
Expand All @@ -15,7 +15,7 @@ mock_response <- function(content, status = 200L, wrap = TRUE,
}
class(content) <- NULL
content <- c(writeBin(content, raw()), as.raw(0L))
} else if (inherits(content, "character")) {
} else if (is.character(content)) {
headers <- mock_headers("content-type" = "text/plain")
content <- c(writeBin(content, raw()), as.raw(0L))
} else {
Expand Down

0 comments on commit 8ee6591

Please sign in to comment.