Running 'testthat.R' [13s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(cthist)
  > 
  > test_check("cthist")
  [ FAIL 19 | WARN 0 | SKIP 0 | PASS 2 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-clinicaltrials_gov_dates.R:3:5'): ClinicalTrials.gov version dates download correctly ──
  "2013-04-15" %in% result || result == "Error" (`actual`) not equal to TRUE (`expected`).
  
  `actual`:   <NA>
  `expected`: TRUE
  ── Failure ('test-clinicaltrials_gov_version_contacts.R:9:9'): ClinicalTrials.gov contacts downloads correctly ──
  jsonlite::fromJSON(version$contacts_data)$label[1] (`actual`) not equal to "Central Contact Person:" (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('Central Contact Person:')
  ── Failure ('test-clinicaltrials_gov_version_criteria.R:9:9'): ClinicalTrials.gov criteria downloads correctly ──
  version$criteria (`actual`) not equal to jsonlite::toJSON("Inclusion Criteria (MCI patients):\n\nright handedness\namnestic and amnestic plus MCI with:\nsubjective memory impairment;\nobjective memory difficulties, at least 1 SD below gender, age and education adjusted standard values;\nrelatively normal performance in other cognitive domains;\nno constraints in activities of daily livings\nage: 50-80 years\n\nExclusion Criteria:\n\nsevere internal or psychiatric disease\nepilepsy\nother severe neurological diseases, e.g. previous major stroke or brain tumor\nDMS-IV manifest dementia\ncontraindication for MRT (claustrophobia, metallic implants, tattoos)") (`expected`).
  
  actual vs expected
  - "[null]"
  + "[\"Inclusion Criteria (MCI patients):\\n\\nright handedness\\namnestic and amnestic plus MCI with:\\nsubjective memory impairment;\\nobjective memory difficulties, at least 1 SD below gender, age and education adjusted standard values;\\nrelatively normal performance in other cognitive domains;\\nno constraints in activities of daily livings\\nage: 50-80 years\\n\\nExclusion Criteria:\\n\\nsevere internal or psychiatric disease\\nepilepsy\\nother severe neurological diseases, e.g. previous major stroke or brain tumor\\nDMS-IV manifest dementia\\ncontraindication for MRT (claustrophobia, metallic implants, tattoos)\"]"
  ── Failure ('test-clinicaltrials_gov_version_enrol.R:9:9'): ClinicalTrials.gov enrolment downloads correctly ──
  version$enrol (`actual`) not equal to "22 [Anticipated]" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('22 [Anticipated]')
  ── Failure ('test-clinicaltrials_gov_version_gender.R:9:9'): ClinicalTrials.gov gender-based downloads correctly ──
  version$gender_based (`actual`) not equal to "Yes" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('Yes')
  ── Failure ('test-clinicaltrials_gov_version_max_age.R:9:9'): ClinicalTrials.gov maximum age downloads correctly ──
  version$max_age (`actual`) not equal to "80" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('80')
  ── Failure ('test-clinicaltrials_gov_version_min_age.R:9:9'): ClinicalTrials.gov minimum age downloads correctly ──
  version$min_age (`actual`) not equal to "50" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('50')
  ── Failure ('test-clinicaltrials_gov_version_om_data.R:9:9'): ClinicalTrials.gov outcome measures downloads correctly ──
  jsonlite::fromJSON(version$om_data)$content[1] (`actual`) not equal to "Performance in LOCATO task (Visual-spatial learning and memory) after a combination of intensive visual-spatial training and tDCS\n[ Time Frame: immediately after end of a 3-day period of training in tDCS condition vs sham condition ]\n\nInvestigation whether the combination of intensive visual-spatial training (LOCATO task) and tDCS leads to improvement of visual-spatial learning and memory measured by performance in LOCATO task after end of a 3 day period of training compared to sham stimulation." (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('Performance in LOCATO task (Visual-spatial learning and memory) after a combination of intensive visual-spatial training and tDCS\n[ Time Frame: immediately after end of a 3-day period of training in tDCS condition vs sham condition ]\n\nInvestigation whether the combination of intensive visual-spatial training (LOCATO task) and tDCS leads to improvement of visual-spatial learning and memory measured by performance in LOCATO task after end of a 3 day period of training compared to sham stimulation.')
  ── Failure ('test-clinicaltrials_gov_version_ostatus.R:9:9'): ClinicalTrials.gov overall status downloads correctly ──
  version$ostatus (`actual`) not equal to "Recruiting" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('Recruiting')
  ── Failure ('test-clinicaltrials_gov_version_pcdate.R:9:9'): ClinicalTrials.gov primary completion date downloads correctly ──
  version$pcdate (`actual`) not equal to "2015-08-01" (`expected`).
  
  `actual`:   NA          
  `expected`: "2015-08-01"
  ── Failure ('test-clinicaltrials_gov_version_pcdate_precision.R:9:9'): ClinicalTrials.gov primary completion date precision downloads correctly ──
  version$pcdate_precision (`actual`) not equal to "month" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('month')
  ── Failure ('test-clinicaltrials_gov_version_pcdatetype.R:9:9'): ClinicalTrials.gov primary completion date type downloads correctly ──
  version$pcdatetype (`actual`) not equal to "Anticipated" (`expected`).
  
  `actual`:   NA           
  `expected`: "Anticipated"
  ── Error ('test-clinicaltrials_gov_version_references.R:9:9'): ClinicalTrials.gov references downloads correctly ──
  Error: Argument 'txt' must be a JSON string, URL or file.
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-clinicaltrials_gov_version_references.R:9:8
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─jsonlite::fromJSON(version$references)
   5.   └─jsonlite:::stop("Argument 'txt' must be a JSON string, URL or file.")
  ── Failure ('test-clinicaltrials_gov_version_results_posted.R:10:9'): ClinicalTrials.gov results posted downloads correctly ──
  ... & ... (`actual`) not equal to TRUE (`expected`).
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-clinicaltrials_gov_version_sex.R:9:9'): ClinicalTrials.gov sex downloads correctly ──
  version$sex (`actual`) not equal to "All" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('All')
  ── Failure ('test-clinicaltrials_gov_version_sponsor_data.R:9:9'): ClinicalTrials.gov contacts downloads correctly ──
  jsonlite::fromJSON(version$sponsor_data)$content[1] (`actual`) not equal to "Charite University, Berlin, Germany" (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('Charite University, Berlin, Germany')
  ── Failure ('test-clinicaltrials_gov_version_startdate.R:9:9'): ClinicalTrials.gov start date downloads correctly ──
  version$startdate (`actual`) not equal to "2014-03-01" (`expected`).
  
  `actual`:   NA          
  `expected`: "2014-03-01"
  ── Failure ('test-clinicaltrials_gov_version_startdate_precision.R:9:9'): ClinicalTrials.gov start date precision downloads correctly ──
  version$startdate_precision (`actual`) not equal to "month" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('month')
  ── Failure ('test-clinicaltrials_gov_version_volunteers.R:9:9'): ClinicalTrials.gov 'accepts healthy volunteers' downloads correctly ──
  version$accepts_healthy_volunteers (`actual`) not equal to "No" (`expected`).
  
  `actual` is a logical vector (NA)
  `expected` is a character vector ('No')
  
  [ FAIL 19 | WARN 0 | SKIP 0 | PASS 2 ]
  Error: Test failures
  Execution halted