Running ‘testthat.R’ [6s/130s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(qualtRics)
  > 
  > test_check("qualtRics")
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-all-surveys.R:28:3): all_surveys() throws an error when URL & key is bad ──
  `all_surveys()` threw an error with unexpected message.
  Expected match: "you may not have the\nrequired authorization"
  Actual message: "Qualtrics API reports a 504 status code."
  Backtrace:
      █
   1. ├─testthat::expect_error(all_surveys(), "you may not have the\nrequired authorization") test-all-surveys.R:28:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─qualtRics::all_surveys()
   7.   └─qualtRics:::qualtrics_api_request("GET", surveys_url)
   8.     └─qualtRics:::qualtrics_response_codes(res)
  ── Failure (test-survey-questions.R:24:3): survey_questions() throws an error where URL & key are bad ──
  `qualtRics::survey_questions("1234")` threw an error with unexpected message.
  Expected match: "you may not have the\nrequired authorization"
  Actual message: "Qualtrics API reports a 504 status code."
  Backtrace:
      █
   1. ├─testthat::expect_error(qualtRics::survey_questions("1234"), "you may not have the\nrequired authorization") test-survey-questions.R:24:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─qualtRics::survey_questions("1234")
   7.   └─qualtRics:::qualtrics_api_request("GET", surveys_url)
   8.     └─qualtRics:::qualtrics_response_codes(res)
  
  [ FAIL 2 | WARN 1 | SKIP 3 | PASS 145 ]
  Error: Test failures
  In addition: Warning message:
  In readRenviron("~/.Renviron") :
    file '/home/hornik/.Renviron' cannot be opened for reading
  Execution halted