Running 'spelling.R' [0s]
  Running 'testthat.R' [16s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(npi)
  > library(httptest)
  > library(purrr)
  
  Attaching package: 'purrr'
  
  The following object is masked from 'package:testthat':
  
      is_null
  
  > library(mockery)
  > library(checkmate)
  > 
  > test_check("npi")
  [ FAIL 13 | WARN 0 | SKIP 0 | PASS 58 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-api.R:41:5'): npi_api() works with GET verb ──────────────────
  `object` threw an error with unexpected message.
  Expected match: "GET https://npiregistry.cms.hhs.gov/api/?version=2.1&city=Atlanta&limit=10"
  Actual message: "Unable to access Internet. Check network connection and try again."
  Backtrace:
      ▆
   1. ├─httptest::expect_GET(...) at test-api.R:41:4
   2. │ └─httptest:::expect_mock_request(object, "GET ", url, " ", ...)
   3. │   └─request_happened()(...)
   4. │     └─testthat:::quasi_capture(...)
   5. │       ├─testthat (local) .capture(...)
   6. │       │ └─base::withCallingHandlers(...)
   7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   8. └─npi:::npi_api("GET", npi_url(), query = params)
   9.   └─rlang::abort("internet_error", message = msg)
  ── Failure ('test-api.R:45:5'): npi_get() functions the same as npi_api() with `GET` ──
  `object` threw an error with unexpected message.
  Expected match: "GET https://npiregistry.cms.hhs.gov/api/?version=2.1&city=Atlanta&limit=10"
  Actual message: "Unable to access Internet. Check network connection and try again."
  Backtrace:
       ▆
    1. ├─httptest::expect_GET(npi_get(npi_url(), query = params), expected_url) at test-api.R:45:4
    2. │ └─httptest:::expect_mock_request(object, "GET ", url, " ", ...)
    3. │   └─request_happened()(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. └─npi:::npi_get(npi_url(), query = params)
    9.   └─npi:::npi_api("GET", url, ...)
   10.     └─rlang::abort("internet_error", message = msg)
  ── Failure ('test-api.R:93:5'): Response validation catches logic errors returned by API ──
  `npi_search()` threw an error with unexpected class.
  Expected class: request_logic_error
  Actual class:   internet_error/rlang_error/error/condition
  Message:        Unable to access Internet. Check network connection and try again.
  Backtrace:
       ▆
    1. ├─testthat::expect_error(npi_search(), class = "request_logic_error") at test-api.R:93:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─npi::npi_search()
    7.   └─npi:::npi_process_results(...)
    8.     └─npi:::npi_control_requests(params, user_n)
    9.       └─npi:::npi_get_results(results = results, query = query)
   10.         └─npi:::npi_get(npi_url(), query = ...)
   11.           └─npi:::npi_api("GET", url, ...)
   12.             └─rlang::abort("internet_error", message = msg)
  ── Failure ('test-api.R:158:5'): We can catch request logic errors in the API response ──
  `npi_search(enumeration_type = "ind")` threw an error with unexpected class.
  Expected class: request_logic_error
  Actual class:   internet_error/rlang_error/error/condition
  Message:        Unable to access Internet. Check network connection and try again.
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-api.R:158:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─npi::npi_search(enumeration_type = "ind")
    7.   └─npi:::npi_process_results(...)
    8.     └─npi:::npi_control_requests(params, user_n)
    9.       └─npi:::npi_get_results(results = results, query = query)
   10.         └─npi:::npi_get(npi_url(), query = ...)
   11.           └─npi:::npi_api("GET", url, ...)
   12.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:167:5'): A valid npi_search() call meets structural expectations ──
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(city = "Atlanta") at test-api.R:167:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:192:5'): enumeration_type controls values of `enumeration_type` in
              response ──
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(city = "Atlanta", enumeration_type = "ind") at test-api.R:192:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:203:5'): npi_search() returns an NPI ─────────────────────
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(...) at test-api.R:203:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:216:5'): Multiple requests happen as needed ──────────────
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(city = "Atlanta", limit = 201L) at test-api.R:216:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:225:5'): If we search for an existing NPI, we get back the correct one ──
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(number = npi) at test-api.R:225:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:234:3'): The initial message accurately reports the requested number of records ──
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-api.R:234:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─npi::npi_search(city = "Atlanta", limit = 1)
    7.   └─npi:::npi_process_results(...)
    8.     └─npi:::npi_control_requests(params, user_n)
    9.       └─npi:::npi_get_results(results = results, query = query)
   10.         └─npi:::npi_get(npi_url(), query = ...)
   11.           └─npi:::npi_api("GET", url, ...)
   12.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:243:5'): npi_process_results returns an empty tibble when npi_search returns zero records ──
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(city = "ZZZZZZZ") at test-api.R:243:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:253:5'): validate_npi_results throws a `bad_class_error` appropriately ──
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(number = npi) at test-api.R:253:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  ── Error ('test-api.R:267:5'): npi_summarize() method works as expected ────────
  <internet_error/rlang_error/error/condition>
  Error in `npi_api("GET", url, ...)`: Unable to access Internet. Check network connection and try again.
  Backtrace:
      ▆
   1. └─npi::npi_search(city = "Atlanta") at test-api.R:267:4
   2.   └─npi:::npi_process_results(...)
   3.     └─npi:::npi_control_requests(params, user_n)
   4.       └─npi:::npi_get_results(results = results, query = query)
   5.         └─npi:::npi_get(npi_url(), query = ...)
   6.           └─npi:::npi_api("GET", url, ...)
   7.             └─rlang::abort("internet_error", message = msg)
  
  [ FAIL 13 | WARN 0 | SKIP 0 | PASS 58 ]
  Error: Test failures
  Execution halted