Running ‘testthat.R’ [4s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(googleway)
  > 
  > test_check("googleway")
  1. Error: places autocomplete object is created (@test-google_place_autocomplete.R#65) 
  HTTP error 502.
  1: google_place_autocomplete(place_input = "here", key = "abc") at testthat/test-google_place_autocomplete.R:65
  2: fun_download_data(map_url, simplify)
  3: jsonlite::fromJSON(map_url)
  4: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  5: parseJSON(txt, bigint_as_char)
  6: parse_con(txt, bigint_as_char)
  7: open(con, "rb")
  8: open.connection(con, "rb")
  
  2. Error: google place details is set (@test-google_place_details.R#13) --------
  HTTP error 502.
  1: google_place_details(place_id = "abc", key = "abc") at testthat/test-google_place_details.R:13
  2: fun_download_data(map_url, simplify)
  3: jsonlite::fromJSON(map_url)
  4: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  5: parseJSON(txt, bigint_as_char)
  6: parse_con(txt, bigint_as_char)
  7: open(con, "rb")
  8: open.connection(con, "rb")
  
  3. Error: rankby ignored when search_string (@test-google_places.R#58) ---------
  HTTP error 502.
  1: expect_warning(google_places(search_string = "Restaurants in Melbourne, Australia", 
         radius = 200, rankby = "prominence", key = "abc")) at testthat/test-google_places.R:58
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: google_places(search_string = "Restaurants in Melbourne, Australia", radius = 200, 
         rankby = "prominence", key = "abc")
  5: fun_download_data(map_url, simplify)
  6: jsonlite::fromJSON(map_url)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  4. Error: search string ignored when rankby is used (@test-google_places.R#76) -
  HTTP error 502.
  1: expect_warning(google_places(search_string = "Restaurangs in Melbourne, Australia", 
         rankby = "distance", key = "abc"), "The 'rankby' argument is ignored when using a 'search_string'") at testthat/test-google_places.R:76
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: google_places(search_string = "Restaurangs in Melbourne, Australia", rankby = "distance", 
         key = "abc")
  5: fun_download_data(map_url, simplify)
  6: jsonlite::fromJSON(map_url)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  5. Error: name used with search string issues warning (@test-google_places.R#101) 
  HTTP error 502.
  1: expect_warning(google_places(search_string = "Restaurants in Melbourne, Australia", 
         name = "Maha", key = "abc")) at testthat/test-google_places.R:101
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: google_places(search_string = "Restaurants in Melbourne, Australia", name = "Maha", 
         key = "abc")
  5: fun_download_data(map_url, simplify)
  6: jsonlite::fromJSON(map_url)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  6. Error: rankby used with search_string is ignored (@test-google_places.R#110) 
  HTTP error 502.
  1: expect_warning(google_places(search_string = "Restaurangs in Melbourne, Australia", 
         rankby = "prominence", key = "abc")) at testthat/test-google_places.R:110
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: google_places(search_string = "Restaurangs in Melbourne, Australia", rankby = "prominence", 
         key = "abc")
  5: fun_download_data(map_url, simplify)
  6: jsonlite::fromJSON(map_url)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  7. Error: radar options throws errors (@test-google_places.R#150) --------------
  HTTP error 502.
  1: expect_warning(google_places(radar = T, key = "abc", search_string = "here", location = c(-37, 
         145), radius = 1, keyword = "there")) at testthat/test-google_places.R:150
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: google_places(radar = T, key = "abc", search_string = "here", location = c(-37, 145), 
         radius = 1, keyword = "there")
  5: fun_download_data(map_url, simplify)
  6: jsonlite::fromJSON(map_url)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  testthat results ================================================================
  OK: 255 SKIPPED: 3 FAILED: 7
  1. Error: places autocomplete object is created (@test-google_place_autocomplete.R#65) 
  2. Error: google place details is set (@test-google_place_details.R#13) 
  3. Error: rankby ignored when search_string (@test-google_places.R#58) 
  4. Error: search string ignored when rankby is used (@test-google_places.R#76) 
  5. Error: name used with search string issues warning (@test-google_places.R#101) 
  6. Error: rankby used with search_string is ignored (@test-google_places.R#110) 
  7. Error: radar options throws errors (@test-google_places.R#150) 
  
  Error: testthat unit tests failed
  Execution halted