Running 'testthat.R' [586s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > test_check("httr")
  Loading required package: httr
  [ FAIL 22 | WARN 0 | SKIP 7 | PASS 134 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • Currently broken (1)
  • On CRAN (6)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-body.r:22'): string/raw in body gives same string in data element ──
  out$data not equal to "test".
  target is NULL, current is character
  ── Failure ('test-body.r:40'): empty list gives empty body ─────────────────────
  out$data not equal to "".
  target is NULL, current is character
  ── Failure ('test-body.r:48'): named list matches form results (encode = 'form') ──
  out$form$a not equal to "1".
  target is NULL, current is character
  ── Failure ('test-body.r:49'): named list matches form results (encode = 'form') ──
  out$form$b not equal to "2".
  target is NULL, current is character
  ── Failure ('test-body.r:60'): named list matches form results (encode = 'json') ──
  out$json$a[[1]] not equal to 1.
  target is NULL, current is numeric
  ── Failure ('test-body.r:61'): named list matches form results (encode = 'json') ──
  out$json$b[[1]] not equal to 2.
  target is NULL, current is numeric
  ── Failure ('test-body.r:69'): decimal precision is preserved (encode = 'json') ──
  out$data not equal to "{\"a\":0.867530986753099}".
  target is NULL, current is character
  ── Failure ('test-body.r:82'): NULL elements are automatically dropped ─────────
  out$form not equal to list(x = "1").
  target is NULL, current is list
  ── Failure ('test-body.r:87'): file and form vals mixed give form and data elements ──
  out$form$a not equal to "1".
  target is NULL, current is character
  ── Error ('test-body.r:88'): file and form vals mixed give form and data elements ──
  Error in `strsplit(out$files$y, "\r?\n")`: non-character argument
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(strsplit(out$files$y, "\r?\n")[[1]], data) at test-body.r:88:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::strsplit(out$files$y, "\r?\n")
  ── Error ('test-body.r:93'): single file matches contents on disk ──────────────
  Error in `strsplit(out$data, "\r?\n")`: non-character argument
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(strsplit(out$data, "\r?\n")[[1]], data) at test-body.r:93:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::strsplit(out$data, "\r?\n")
  ── Failure ('test-http-head.r:5'): HEAD succeeds regardless of wrapper ─────────
  http_error(VERB("HEAD", "https://httpbin.org")) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-oauth.R:15'): oauth2.0 signing works ─────────────────────────
  "Bearer ofNoArms" not equal to response_content$Authorization.
  Types not compatible: character is not NULL
  ── Failure ('test-response.r:12'): DELETE deletes ──────────────────────────────
  DELETE("http://httpbin.org/delete")$status_code not equal to 200.
  1/1 mismatches
  [1] 504 - 200 == 304
  ── Failure ('test-response.r:16'): POST posts ──────────────────────────────────
  GET("http://httpbin.org/post")$status_code not equal to 405.
  1/1 mismatches
  [1] 504 - 405 == 99
  ── Failure ('test-response.r:17'): POST posts ──────────────────────────────────
  POST("http://httpbin.org/post")$status_code not equal to 200.
  1/1 mismatches
  [1] 504 - 200 == 304
  ── Failure ('test-response.r:21'): PATCH patches ───────────────────────────────
  GET("http://httpbin.org/patch")$status_code not equal to 405.
  1/1 mismatches
  [1] 504 - 405 == 99
  ── Failure ('test-response.r:22'): PATCH patches ───────────────────────────────
  PATCH("http://httpbin.org/patch")$status_code not equal to 200.
  1/1 mismatches
  [1] 504 - 200 == 304
  ── Failure ('test-response.r:27'): PUT puts ────────────────────────────────────
  PUT("http://httpbin.org/put")$status_code not equal to 200.
  1/1 mismatches
  [1] 504 - 200 == 304
  ── Error ('test-response.r:38'): headers returned as expected ──────────────────
  Error in `names(headers) <- tolower(names(headers))`: attempt to set an attribute on NULL
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(round_trip(a = 1)$a, "1") at test-response.r:38:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─httr (local) round_trip(a = 1)
  ── Failure ('test-response.r:54'): application/json responses parsed as lists ──
  response$status_code not equal to 200.
  1/1 mismatches
  [1] 504 - 200 == 304
  Backtrace:
      ▆
   1. └─httr (local) test_user_agent() at test-response.r:54:2
   2.   └─testthat::expect_equal(response$status_code, 200) at test-response.r:49:4
  ── Failure ('test-response.r:54'): application/json responses parsed as lists ──
  `expected_reply` not equal to content(response).
  Names: 1 string mismatch
  Attributes: < names for current but not for target >
  Attributes: < Length mismatch: comparison on first 0 components >
  Length mismatch: comparison on first 1 components
  Component 1: Modes: character, externalptr
  Component 1: target is character, current is externalptr
  Backtrace:
      ▆
   1. └─httr (local) test_user_agent() at test-response.r:54:2
   2.   └─testthat::expect_equal(expected_reply, content(response)) at test-response.r:51:4
  
  [ FAIL 22 | WARN 0 | SKIP 7 | PASS 134 ]
  Error: Test failures
  Execution halted