Running ‘testthat.R’ [11s/85s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ctrdata)
  Information on this package and how to use it:
  https://cran.r-project.org/package=ctrdata
  
  Please respect the requirements and the copyrights of the
  clinical trial registers when using their information. Call
  ctrOpenSearchPagesInBrowser(copyright = TRUE) and visit
  https://www.clinicaltrialsregister.eu/disclaimer.html
  https://clinicaltrials.gov/ct2/about-site/terms-conditions#Use
  
  Testing helper binaries:
  completed.
  > 
  > test_check("ctrdata")
  ── 1. Error: browser interaction (@testfunctions.R#480)  ───────────────────────
  missing value where TRUE/FALSE needed
  1: expect_message(ctrOpenSearchPagesInBrowser(dbQueryHistory(collection = coll)[1, ]), 
         "Opening browser for search:") at testthat/testfunctions.R:480
  2: quasi_capture(enquo(object), label, capture_messages)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(.quo), get_env(.quo))
  6: ctrOpenSearchPagesInBrowser(dbQueryHistory(collection = coll)[1, ])
  
  
  Downloading: 16 kB     
  Downloading: 16 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     
  Downloading: 21 kB     ── 2. Failure: operations on database after download from register (@testfunctio
  `dbFindIdsUniqueTrials(collection = coll, preferregister = "EUCTR")` produced unexpected messages.
  Expected match: Searching multiple country records
  Actual values:
  * Using MongoDB (collections "ThisNameSpaceShouldNotExistAnywhereInAMongoDB" in database "mongodb://localhost/users").
  
  * * Total of 1 records in collection.
  
  * No EUCTR records found.
  
  * Searching duplicates: Found 0 CTGOV _id in CTGOV otherids (secondary_id, nct_alias, org_study_id)
  
  * = Returning keys (_id) of 1 records out of total of 1 records in collection "ThisNameSpaceShouldNotExistAnywhereInAMongoDB".
  
  
  ── 3. Failure: operations on database after download from register (@testfunctio
  `dbFindIdsUniqueTrials(...)` did not produce any warnings.
  
  
  Downloading: 16 kB     
  Downloading: 16 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 20 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     
  Downloading: 3.5 kB     ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 40 SKIPPED: 6 WARNINGS: 4 FAILED: 3
  1. Error: browser interaction (@testfunctions.R#480) 
  2. Failure: operations on database after download from register (@testfunctions.R#543) 
  3. Failure: operations on database after download from register (@testfunctions.R#555) 
  
  Error: testthat unit tests failed
  Execution halted