Skip to content

Commit be68041

Browse files
authored
Use base pipe (#802)
A couple of test files still had the magrittr pipe.
1 parent 76ecb84 commit be68041

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/testthat/test-req-body.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ test_that("can send file with redirect", {
7373
path <- tempfile()
7474
writeChar(str, path)
7575

76-
resp <- request_test("/redirect-to") %>%
76+
resp <- request_test("/redirect-to") |>
7777
req_url_query(url = "/post", status_code = "307") |>
7878
req_body_file(path, type = "text/plain") |>
7979
req_perform()

tests/testthat/test-req-dry-run.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_that("authorization headers are redacted", {
2929
expect_equal(out$headers$authorization, redacted_sentinel())
3030

3131
# unless specifically requested
32-
req <- request("http://example.com") %>% req_auth_basic("user", "password")
32+
req <- request("http://example.com") |> req_auth_basic("user", "password")
3333
expect_snapshot(out <- req_dry_run(req, redact_headers = FALSE))
3434
expect_equal(out$headers$authorization, "Basic dXNlcjpwYXNzd29yZA==")
3535
})

tests/testthat/test-resp-url.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
test_that("can extract url components from a response", {
2-
req <- request_test("/get") %>% req_url_query(a = "1", b = "2")
2+
req <- request_test("/get") |> req_url_query(a = "1", b = "2")
33
resp <- req_perform(req)
44

55
expect_equal(resp_url(resp), example_url("/get?a=1&b=2"))

0 commit comments

Comments
 (0)