Running ‘testthat.R’ [4s/127s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bambooHR)
  > 
  > test_check("bambooHR")
  [ FAIL 8 | WARN 4 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-get_company_file.R:6:5'): We can see what files there are ──────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
      ▆
   1. └─bambooHR::get_company_file(suppress_view = TRUE) at test-get_company_file.R:6:5
   2.   └─bambooHR::get_request(url)
   3.     └─bambooHR:::check_internet()
  ── Error ('test-get_employee.R:6:5'): We can get the directory ─────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(urls, function(url) {
      get_request(url) %>% httr::content("parsed")
  })`: i In index: 1.
  Caused by error in `check_internet()`:
  ! Please check your internet connection.
  Backtrace:
       ▆
    1. ├─bambooHR::get_employee() at test-get_employee.R:6:5
    2. │ └─purrr::map(...)
    3. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    4. │     ├─purrr:::with_indexed_errors(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     ├─purrr:::call_with_cleanup(...)
    7. │     └─bambooHR (local) .f(.x[[i]], ...)
    8. │       ├─get_request(url) %>% httr::content("parsed")
    9. │       └─bambooHR::get_request(url)
   10. │         └─bambooHR:::check_internet()
   11. │           └─base::stop("Please check your internet connection.")
   12. ├─httr::content(., "parsed")
   13. │ ├─base::stopifnot(is.response(x))
   14. │ └─httr:::is.response(x)
   15. └─base::.handleSimpleError(...)
   16.   └─purrr (local) h(simpleError(msg, call))
   17.     └─cli::cli_abort(...)
   18.       └─rlang::abort(...)
  ── Error ('test-get_employee_file.R:6:5'): We can see what files there are ─────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
      ▆
   1. └─bambooHR::get_employee_file(id = 123, file_id = "view", suppress_view = TRUE) at test-get_employee_file.R:6:5
   2.   └─bambooHR::get_request(url)
   3.     └─bambooHR:::check_internet()
  ── Error ('test-get_meta.R:6:5'): Can get tables ───────────────────────────────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
       ▆
    1. ├─bambooHR::get_meta("tables") at test-get_meta.R:6:5
    2. │ ├─... %>% janitor::clean_names()
    3. │ └─bambooHR::get_request(url)
    4. │   └─bambooHR:::check_internet()
    5. ├─janitor::clean_names(.)
    6. ├─tibble::tibble(.)
    7. │ └─tibble:::tibble_quos(xs, .rows, .name_repair)
    8. │   └─rlang::eval_tidy(xs[[j]], mask)
    9. ├─purrr::when(...)
   10. ├─purrr::when(...)
   11. └─httr::content(., response, as = "text", type = "json", encoding = "UTF-8")
   12.   ├─base::stopifnot(is.response(x))
   13.   └─httr:::is.response(x)
  ── Error ('test-get_table.R:6:5'): We can get the directory ────────────────────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
      ▆
   1. └─bambooHR::get_table(employee_id = 123, table_name = "jobInfo") at test-get_table.R:6:5
   2.   └─bambooHR::get_request(url)
   3.     └─bambooHR:::check_internet()
  ── Error ('test-get_time_off_requests.R:5:5'): get timeoff requests works ──────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
      ▆
   1. └─bambooHR::get_timeoff_requests("2021-10-01", "2022-02-01", employee_id = "998") at test-get_time_off_requests.R:5:5
   2.   └─bambooHR::get_request(url)
   3.     └─bambooHR:::check_internet()
  ── Error ('test-get_time_off_types.R:4:5'): get time off types works ───────────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
       ▆
    1. ├─bambooHR::get_timeoff_types() at test-get_time_off_types.R:4:5
    2. │ └─bambooHR::get_meta("time_off/types")
    3. │   ├─... %>% janitor::clean_names()
    4. │   └─bambooHR::get_request(url)
    5. │     └─bambooHR:::check_internet()
    6. ├─janitor::clean_names(.)
    7. ├─tibble::tibble(.)
    8. │ └─tibble:::tibble_quos(xs, .rows, .name_repair)
    9. │   └─rlang::eval_tidy(xs[[j]], mask)
   10. ├─purrr::when(...)
   11. ├─purrr::when(...)
   12. └─httr::content(., response, as = "text", type = "json", encoding = "UTF-8")
   13.   ├─base::stopifnot(is.response(x))
   14.   └─httr:::is.response(x)
  ── Error ('test-get_whos_out.R:4:5'): get who's out works ──────────────────────
  Error in `check_internet()`: Please check your internet connection.
  Backtrace:
      ▆
   1. └─bambooHR::get_whos_out("2020-01-01", "2021-01-01") at test-get_whos_out.R:4:5
   2.   └─bambooHR::get_request(url)
   3.     └─bambooHR:::check_internet()
  
  [ FAIL 8 | WARN 4 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted