Running ‘spelling.R’ [0s/1s]
  Running ‘testthat.R’ [27s/56s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(covidregionaldata)
  > source("testthat/custom_tests/mock_data.R")
  > 
  > test_check("covidregionaldata")
  trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201220.xlsx'
  Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 157107 bytes (153 KB)
  ==================================================
  downloaded 153 KB
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● On CRAN (46)
  
  ══ Warnings ════════════════════════════════════════════════════════════════════
  ── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
  1649 parsing failures.
   row  col           expected   actual                                                                                                                                                                                                      file
  2028 age  1/0/T/F/TRUE/FALSE 0_to_5   'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2028 rate 1/0/T/F/TRUE/FALSE 17.3     'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2029 age  1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2029 rate 1/0/T/F/TRUE/FALSE 538.7    'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2030 age  1/0/T/F/TRUE/FALSE 6_to_17  'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  .... .... .................. ........ .........................................................................................................................................................................................................
  See problems(...) for more details.
  
  Backtrace:
    1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
    2. purrr::map(query_filters, get_uk_data, release_date = release_date)
    3. covidregionaldata:::.f(.x[[i]], ...)
    4. purrr::map(csv_links, ~safe_reader(.)[[1]])
    5. covidregionaldata:::.f(.x[[i]], ...)
    6. purrr:::safe_reader(.)
   15. covidregionaldata:::.f(...)
   16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
   17. readr:::read_delimited(...)
   18. readr:::warn_problems(out)
  ── Warning (test-get_uk_regional_cases.R:56:3): get_uk_regional_cases returns data by date of release ──
  2730 parsing failures.
   row  col           expected   actual                                                                                                                                                                                                      file
  1388 age  1/0/T/F/TRUE/FALSE 18_to_64 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
  1388 rate 1/0/T/F/TRUE/FALSE 199.5    'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
  1389 age  1/0/T/F/TRUE/FALSE 6_to_17  'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
  1389 rate 1/0/T/F/TRUE/FALSE 17.7     'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
  1390 age  1/0/T/F/TRUE/FALSE 85+      'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
  .... .... .................. ........ .........................................................................................................................................................................................................
  See problems(...) for more details.
  
  Backtrace:
    1. covidregionaldata:::get_uk_regional_cases_only_level_1(...) test-get_uk_regional_cases.R:56:2
    2. purrr::map(query_filters, get_uk_data, release_date = release_date)
    3. covidregionaldata:::.f(.x[[i]], ...)
    4. purrr::map(csv_links, ~safe_reader(.)[[1]])
    5. covidregionaldata:::.f(.x[[i]], ...)
    6. purrr:::safe_reader(.)
   15. covidregionaldata:::.f(...)
   16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
   17. readr:::read_delimited(...)
   18. readr:::warn_problems(out)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
  Error: Can't rename columns that don't exist.
  ✖ Column `newAdmissions` doesn't exist.
  Backtrace:
       █
    1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
    2. │ └─`%>%`(...)
    3. ├─dplyr::mutate(...)
    4. ├─dplyr::select(., -level_2_region_code.y)
    5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
    6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
    7. ├─dplyr::rename(...)
    8. └─dplyr:::rename.data.frame(...)
    9.   └─tidyselect::eval_rename(expr(c(...)), .data)
   10.     └─tidyselect:::rename_impl(...)
   11.       └─tidyselect:::eval_select_impl(...)
   12.         ├─tidyselect:::with_subscript_errors(...)
   13.         │ ├─base::tryCatch(...)
   14.         │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   15.         │ │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   16.         │ │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   17.         │ └─tidyselect:::instrument_base_errors(expr)
   18.         │   └─base::withCallingHandlers(...)
   19.         └─tidyselect:::vars_select_eval(...)
   20.           └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   21.             └─tidyselect:::eval_c(expr, data_mask, context_mask)
   22.               └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   23.                 └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
   24.                   └─tidyselect:::as_indices_sel_impl(...)
   25.                     └─tidyselect:::as_indices_impl(x, vars, strict = strict)
   26.                       └─tidyselect:::chr_as_locations(x, vars)
   27.                         └─vctrs::vec_as_location(x, n = length(vars), names = vars)
   28.                           └─(function () ...
   29.                             └─vctrs:::stop_subscript_oob(...)
   30.                               └─vctrs:::stop_subscript(...)
  
  [ FAIL 1 | WARN 2 | SKIP 46 | PASS 22 ]
  Error: Test failures
  Execution halted