Running ‘testthat.R’ [1s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(refimpact)
  refimpact: API wrapper for the UK REF 2014 Impact Case Studies Database.
  Run ?refimpact for help, or see the vignette.
  > 
  > test_check("refimpact")
  1. Error: api_method value of ListTagValues gives no error if tag_value is
            provided (@test_input_validation.R#22) 
  ref_get: API did not return json.
  API returned the following text:
  Request #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details.
  1: expect_silent(ListTagValues_validate("ListTagValues", 5)) at testthat/test_input_validation.R:22
  2: evaluate_promise(object)
  3: with_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: ListTagValues_validate("ListTagValues", 5)
  7: ref_get("ListTagTypes")
  8: stop("ref_get: API did not return json.\n", "API returned the following text:\n", 
         xml2::xml_text(tmp), call. = FALSE)
  
  2. Failure: useful error if unseen tag_value is provided to ListTagValues (@test_input_validation.R#31) 
  error$message does not match "*tag_type*".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  3. Error: list elements with acceptable names and parameters throw no error or
            warning (@test_input_validation.R#65) 
  ref_get: API did not return json.
  API returned the following text:
  Request #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details.
  1: expect_silent(SearchCaseStudies_prepare(list(UKPRN = 10007777))) at testthat/test_input_validation.R:65
  2: evaluate_promise(object)
  3: with_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: SearchCaseStudies_prepare(list(UKPRN = 10007777))
  7: ref_get("ListInstitutions")
  8: stop("ref_get: API did not return json.\n", "API returned the following text:\n", 
         xml2::xml_text(tmp), call. = FALSE)
  
  4. Failure: unseen UKPRNs throw an error (@test_input_validation.R#79) ---------
  error$message does not match "UKPRN".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  5. Failure: unseen UKPRNs throw an error (@test_input_validation.R#80) ---------
  error$message does not match "UKPRN".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  6. Failure: unseen UKPRNs throw an error (@test_input_validation.R#81) ---------
  error$message does not match "UKPRN".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  7. Failure: unseen UOAs throw an error (@test_input_validation.R#85) -----------
  error$message does not match "UoA".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  8. Failure: unseen UOAs throw an error (@test_input_validation.R#86) -----------
  error$message does not match "UoA".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  9. Failure: unseen UOAs throw an error (@test_input_validation.R#87) -----------
  error$message does not match "UoA".
  Actual value: "ref_get: API did not return json.\nAPI returned the following text:\nRequest ErrorBODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}Request ErrorThe server encountered an error processing the request. See server logs for more details."
  
  
  testthat results ================================================================
  OK: 40 SKIPPED: 7 FAILED: 9
  1. Error: api_method value of ListTagValues gives no error if tag_value is
            provided (@test_input_validation.R#22) 
  2. Failure: useful error if unseen tag_value is provided to ListTagValues (@test_input_validation.R#31) 
  3. Error: list elements with acceptable names and parameters throw no error or
            warning (@test_input_validation.R#65) 
  4. Failure: unseen UKPRNs throw an error (@test_input_validation.R#79) 
  5. Failure: unseen UKPRNs throw an error (@test_input_validation.R#80) 
  6. Failure: unseen UKPRNs throw an error (@test_input_validation.R#81) 
  7. Failure: unseen UOAs throw an error (@test_input_validation.R#85) 
  8. Failure: unseen UOAs throw an error (@test_input_validation.R#86) 
  9. Failure: unseen UOAs throw an error (@test_input_validation.R#87) 
  
  Error: testthat unit tests failed
  Execution halted