Running ‘testthat.R’ [220s/228s]
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.
  > 
  > test_check("refimpact")
  1. Error: get_institutions() returns a tibble (@test_institutions.R#6) ---------
  HTTP error 400.
  1: expect_equal(dim(get_institutions()), c(155, 5)) at testthat/test_institutions.R:6
  2: compare(object, expected, ...)
  3: get_institutions()
  4: tibble::as_data_frame(jsonlite::fromJSON(query_url))
  5: jsonlite::fromJSON(query_url)
  6: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  7: parseJSON(txt, bigint_as_char)
  8: parse_con(txt, 1024^2, bigint_as_char)
  9: open(con, "rb")
  10: open.connection(con, "rb")
  
  2. Error: Function returns sensible data frames for sensible queries (@test_search_case_studies.R#6) 
  HTTP error 400.
  1: expect_equal(dim(get_case_studies(ID = 56)), c(1, 19)) at testthat/test_search_case_studies.R:6
  2: compare(object, expected, ...)
  3: get_case_studies(ID = 56)
  4: tibble::as_data_frame(jsonlite::fromJSON(query_url))
  5: jsonlite::fromJSON(query_url)
  6: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  7: parseJSON(txt, bigint_as_char)
  8: parse_con(txt, 1024^2, bigint_as_char)
  9: open(con, "rb")
  10: open.connection(con, "rb")
  
  3. Error: get_tag_types() returns a tibble (@test_tag_types.R#6) ---------------
  HTTP error 400.
  1: expect_equal(dim(get_tag_types()), c(13, 2)) at testthat/test_tag_types.R:6
  2: compare(object, expected, ...)
  3: get_tag_types()
  4: tibble::as_data_frame(jsonlite::fromJSON(query_url))
  5: jsonlite::fromJSON(query_url)
  6: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  7: parseJSON(txt, bigint_as_char)
  8: parse_con(txt, 1024^2, bigint_as_char)
  9: open(con, "rb")
  10: open.connection(con, "rb")
  
  4. Error: get_tag_value() returns a tibble (@test_tag_values.R#6) --------------
  HTTP error 400.
  1: expect_equal(dim(get_tag_values(3)), c(313, 2)) at testthat/test_tag_values.R:6
  2: compare(object, expected, ...)
  3: get_tag_values(3)
  4: tibble::as_data_frame(jsonlite::fromJSON(query_url))
  5: jsonlite::fromJSON(query_url)
  6: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  7: parseJSON(txt, bigint_as_char)
  8: parse_con(txt, 1024^2, bigint_as_char)
  9: open(con, "rb")
  10: open.connection(con, "rb")
  
  5. Error: get_units_of_assessment() returns a tibble (@test_units_of_assessment.R#6) 
  HTTP error 400.
  1: expect_equal(dim(get_units_of_assessment()), c(36, 3)) at testthat/test_units_of_assessment.R:6
  2: compare(object, expected, ...)
  3: get_units_of_assessment()
  4: tibble::as_data_frame(jsonlite::fromJSON(query_url))
  5: jsonlite::fromJSON(query_url)
  6: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  7: parseJSON(txt, bigint_as_char)
  8: parse_con(txt, 1024^2, bigint_as_char)
  9: open(con, "rb")
  10: open.connection(con, "rb")
  
  testthat results ================================================================
  OK: 21 SKIPPED: 0 FAILED: 5
  1. Error: get_institutions() returns a tibble (@test_institutions.R#6) 
  2. Error: Function returns sensible data frames for sensible queries (@test_search_case_studies.R#6) 
  3. Error: get_tag_types() returns a tibble (@test_tag_types.R#6) 
  4. Error: get_tag_value() returns a tibble (@test_tag_values.R#6) 
  5. Error: get_units_of_assessment() returns a tibble (@test_units_of_assessment.R#6) 
  
  Error: testthat unit tests failed
  Execution halted