Running ‘testthat.R’ [11s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rATTAINS)
  > 
  > test_check("rATTAINS")
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/actions/R8-ND-2018-03_N_Nactions.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/assessmentUnits/AL03150201-0107-200assessmentUnits.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/assessmentUnits/AL03150201-0107-200assessmentUnits.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/assessments/SDDENR_GRAZING_IN_RIPARIAN_OR_SHORELINE_ZONES_N_Nassessments.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/assessments/SDDENR_GRAZING_IN_RIPARIAN_OR_SHORELINE_ZONES_N_Nassessments.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/huc12summary/020700100204huc12.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/huc12summary/020700100204huc12.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/plans/020700100103_Nplans.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/plans/020700100103_Nplans.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/usesStateSummary/TDECWR_2016state_summary.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/usesStateSummary/TDECWR_2016state_summary.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/surveys/SDDENRsurveys.json
  reading cached file from: /tmp/check-CRAN-regular-hornik/cache/R/attains-public/api/surveys/SDDENRsurveys.json
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-actions.R:3:3): actions webservice works ────────────────────────
  Error: Column `agencyCode` not found in `.data`
  Backtrace:
       █
    1. ├─vcr::use_cassette(...) test-actions.R:3:2
    2. │ └─cassette$call_block(...)
    3. ├─rATTAINS::actions(action_id = "R8-ND-2018-03") test-actions.R:4:4
    4. │ └─rATTAINS:::actions_to_tibble(...)
    5. │   └─`%>%`(...)
    6. ├─janitor::clean_names(.)
    7. ├─tibble::as_tibble(.)
    8. ├─dplyr::select(., -c(.data$array.index))
    9. ├─tidyjson::spread_all(., recursive = TRUE)
   10. │ └─tidyjson::is.tbl_json(.x)
   11. ├─tidyjson::gather_array(.)
   12. │ ├─assertthat::assert_that(!("..name" %in% names(.x)))
   13. │ │ └─assertthat::see_if(..., env = env, msg = msg)
   14. │ │   ├─base::tryCatch(...)
   15. │ │   │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   16. │ │   │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   17. │ │   │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   18. │ │   └─base::eval(assertion, env)
   19. │ │     └─base::eval(assertion, env)
   20. │ └─"..name" %in% names(.x)
   21. ├─tidyjson::enter_object(., "documentTypes")
   22. │ └─tidyjson::is.tbl_json(.x)
   23. ├─dplyr::select(., -c(.data$array.index))
   24. ├─tidyjson::spread_all(.)
   25. │ └─tidyjson::is.tbl_json(.x)
   26. ├─tidyjson::gather_array(.)
   27. │ ├─assertthat::assert_that(!("..name" %in% names(.x)))
   28. │ │ └─assertthat::see_if(..., env = env, msg = msg)
   29. │ │   ├─base::tryCatch(...)
   30. │ │   │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   31. │ │   │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   32. │ │   │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   33. │ │   └─base::eval(assertion, env)
   34. │ │     └─base::eval(assertion, env)
   35. │ └─"..name" %in% names(.x)
   36. ├─tidyjson::enter_object(., "documents")
   37. │ └─tidyjson::is.tbl_json(.x)
   38. ├─dplyr::rename(., agencyCode_1 = .data$agencyCode)
   39. ├─dplyr:::rename.data.frame(., agencyCode_1 = .data$agencyCode)
   40. │ └─tidyselect::eval_rename(expr(c(...)), .data)
   41. │   └─tidyselect:::rename_impl(...)
   42. │     └─tidyselect:::eval_select_impl(...)
   43. │       ├─tidyselect:::with_subscript_errors(...)
   44. │       │ ├─base::tryCatch(...)
   45. │       │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   46. │       │ │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   47. │       │ │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   48. │       │ └─tidyselect:::instrument_base_errors(expr)
   49. │       │   └─base::withCallingHandlers(...)
   50. │       └─tidyselect:::vars_select_eval(...)
   51. │         └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   52. │           └─tidyselect:::eval_c(expr, data_mask, context_mask)
   53. │             └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   54. │               └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
   55. │                 └─base::eval(expr, data_mask)
   56. │                   └─base::eval(expr, data_mask)
   57. │                     ├─agencyCode
   58. │                     └─rlang:::`$.rlang_data_pronoun`(.data, agencyCode)
   59. │                       └─rlang:::data_pronoun_get(x, nm)
   60. └─rlang:::abort_data_pronoun(x)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 43 ]
  Error: Test failures
  Execution halted