Running 'testthat.R' [142s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(nlgeocoder)
  > 
  > test_check("nlgeocoder")
  -- 1. Error: Dataframe returned (not an sf object) (@test-nl_geocode.R#41)  ----
  cannot open the connection
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "data.frame") at testthat/test-nl_geocode.R:41
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  -- 2. Error: return as wgs84 is working (@test-nl_geocode.R#46)  ---------------
  cannot open the connection
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "wgs84") at testthat/test-nl_geocode.R:46
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  -- 3. Error: return as rd is working (@test-nl_geocode.R#51)  ------------------
  cannot open the connection
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "rd") at testthat/test-nl_geocode.R:51
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  -- 4. Error: return as data.frame is working (@test-nl_geocode.R#56)  ----------
  cannot open the connection
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "data.frame") at testthat/test-nl_geocode.R:56
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  -- 5. Error: restrict search to Groningen (@test-nl_geocode.R#61)  -------------
  cannot open the connection
  1: nl_geocode("Hoofdstraat", fq = "provincienaam:Groningen") at testthat/test-nl_geocode.R:61
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  -- 6. Error: restrict fields (@test-nl_geocode.R#66)  --------------------------
  cannot open the connection
  1: nl_geocode("Hoofdstraat", fl = c("woonplaatsnaam", "centroide_ll")) at testthat/test-nl_geocode.R:66
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  -- 7. Error: Dvorákhof (@test-utf8.R#4)  ---------------------------------------
  cannot open the connection
  1: nl_suggest("Dvorákhof") at testthat/test-utf8.R:4
  2: jsonlite::read_json(q_url, simplifyVector = TRUE)
  3: parse_json(file(path), simplifyVector = simplifyVector, ...)
  4: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  5: parseJSON(txt, bigint_as_char)
  6: parse_con(txt, bigint_as_char)
  7: open(con, "rb")
  8: open.connection(con, "rb")
  
  == testthat results  ===========================================================
  OK: 7 SKIPPED: 26 FAILED: 7
  1. Error: Dataframe returned (not an sf object) (@test-nl_geocode.R#41) 
  2. Error: return as wgs84 is working (@test-nl_geocode.R#46) 
  3. Error: return as rd is working (@test-nl_geocode.R#51) 
  4. Error: return as data.frame is working (@test-nl_geocode.R#56) 
  5. Error: restrict search to Groningen (@test-nl_geocode.R#61) 
  6. Error: restrict fields (@test-nl_geocode.R#66) 
  7. Error: Dvorákhof (@test-utf8.R#4) 
  
  Error: testthat unit tests failed
  Execution halted