Running 'testthat.R' [22s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(rbcb)
  > 
  > test_check("rbcb")
  -- 1. Error: it should get currency data from BCB (@test-currencies.R#5)  ------
  BCB API Request error, status code = 500
  1: get_currency("USD", "2017-03-01", "2017-03-02", as = "text") at testthat/test-currencies.R:5
  2: get_currency_id(symbol)
  3: suppressMessages(currency_id_list())
  4: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  5: currency_id_list()
  6: stop("BCB API Request error, status code = ", res$status_code)
  
  -- 2. Error: it should get a time series of a currency from bcb (@test-currencie
  BCB API Request error, status code = 500
  1: get_currency("USD", "2017-03-01", "2017-03-14") at testthat/test-currencies.R:11
  2: get_currency_id(symbol)
  3: suppressMessages(currency_id_list())
  4: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  5: currency_id_list()
  6: stop("BCB API Request error, status code = ", res$status_code)
  
  -- 3. Error: it should get currency code (@test-currencies.R#20)  --------------
  BCB API Request error, status code = 500
  1: get_currency_id("BRL") at testthat/test-currencies.R:20
  2: suppressMessages(currency_id_list())
  3: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  4: currency_id_list()
  5: stop("BCB API Request error, status code = ", res$status_code)
  
  -- 4. Error: it should get MXN and ARS data (@test-currencies.R#25)  -----------
  BCB API Request error, status code = 500
  1: get_currency("MXN", "2018-05-28", "2018-05-30") at testthat/test-currencies.R:25
  2: get_currency_id(symbol)
  3: suppressMessages(currency_id_list())
  4: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  5: currency_id_list()
  6: stop("BCB API Request error, status code = ", res$status_code)
  
  -- 5. Error: it should fetch data from annual market expectations API (@test-foc
  lexical error: invalid char in json text.
                                         <!DOCTYPE HTML PUBLIC "-//IETF/
                       (right here) ------^
  1: get_annual_market_expectations(indic, start_date, end_date) at testthat/test-focus-annual.R:8
  2: jsonlite::fromJSON(text_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  -- 6. Error: it should fetch data from monthly market expectations API (@test-fo
  lexical error: invalid char in json text.
                                         <!DOCTYPE HTML PUBLIC "-//IETF/
                       (right here) ------^
  1: get_monthly_market_expectations(indic, start_date, end_date) at testthat/test-focus-monthly.R:8
  2: jsonlite::fromJSON(text_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  -- 7. Error: it should fetch data from monthly market expectations API without s
  lexical error: invalid char in json text.
                                         <!DOCTYPE HTML PUBLIC "-//IETF/
                       (right here) ------^
  1: get_monthly_market_expectations(indic, end_date = end_date, `$top` = 10) at testthat/test-focus-monthly.R:17
  2: jsonlite::fromJSON(text_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  -- 8. Error: it should fetch data from monthly market expectations API without e
  lexical error: invalid char in json text.
                                         <!DOCTYPE HTML PUBLIC "-//IETF/
                       (right here) ------^
  1: get_monthly_market_expectations(indic, start_date = start_date) at testthat/test-focus-monthly.R:26
  2: jsonlite::fromJSON(text_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  -- 9. Error: it should fetch data from quarterly market expectations API (@test-
  lexical error: invalid char in json text.
                                         <!DOCTYPE HTML PUBLIC "-//IETF/
                       (right here) ------^
  1: get_quarterly_market_expectations(indic, start_date, end_date) at testthat/test-focus-quarterly.R:8
  2: jsonlite::fromJSON(text_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  -- 10. Error: it should get series json (@test-get_series.R#4)  ----------------
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(1, start_date = "2017-03-01", end_date = "2017-03-01", as = "text") at testthat/test-get_series.R:4
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 11. Error: it should get one series as data.frame (@test-get_series.R#11)  --
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(1, last = 10) at testthat/test-get_series.R:11
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 12. Error: it should name the series (@test-get_series.R#22)  ---------------
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), last = 10) at testthat/test-get_series.R:22
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 13. Error: it should get series as xts (@test-get_series.R#27)  -------------
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), last = 10, as = "xts") at testthat/test-get_series.R:27
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 14. Error: it should get series as ts (@test-get_series.R#32)  --------------
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(IPCA = 433), start_date = as.Date("2017-01-01"), as = "ts") at testthat/test-get_series.R:32
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 15. Error: it should get series within a date period (@test-get_series.R#44) 
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), start_date = "2017-03-01", end_date = "2017-03-29") at testthat/test-get_series.R:44
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 16. Error: it should get series within a date period specifying only start_da
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), start_date = start) at testthat/test-get_series.R:52
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 17. Error: it should get series within a date period specifying only end_date
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), end_date = end) at testthat/test-get_series.R:59
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 18. Error: it should get multiple series (@test-get_series.R#66)  -----------
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1, IBOVESPA = 7), start_date = start) at testthat/test-get_series.R:66
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 19. Error: it should create series objects (@test-series_obj.R#6)  ----------
  'names' attribute [6] must be the same length as the vector [0]
  1: series_obj(code) at testthat/test-series_obj.R:6
  2: lapply(ser, series_info)
  3: FUN(X[[i]], ...)
  4: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 20. Error: it should create series url (@test-series_obj.R#23)  -------------
  'names' attribute [6] must be the same length as the vector [0]
  1: series_obj(code) at testthat/test-series_obj.R:23
  2: lapply(ser, series_info)
  3: FUN(X[[i]], ...)
  4: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 21. Error: it should create series info (@test-series_obj.R#29)  ------------
  'names' attribute [6] must be the same length as the vector [0]
  1: series_obj(code) at testthat/test-series_obj.R:29
  2: lapply(ser, series_info)
  3: FUN(X[[i]], ...)
  4: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  -- 22. Error: (unknown) (@test-url.R#4)  ---------------------------------------
  'names' attribute [6] must be the same length as the vector [0]
  1: series_obj(c(USDBRL = 1)) at testthat/test-url.R:4
  2: lapply(ser, series_info)
  3: FUN(X[[i]], ...)
  4: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  == testthat results  ===========================================================
  OK: 2 SKIPPED: 0 FAILED: 22
  1. Error: it should get currency data from BCB (@test-currencies.R#5) 
  2. Error: it should get a time series of a currency from bcb (@test-currencies.R#11) 
  3. Error: it should get currency code (@test-currencies.R#20) 
  4. Error: it should get MXN and ARS data (@test-currencies.R#25) 
  5. Error: it should fetch data from annual market expectations API (@test-focus-annual.R#8) 
  6. Error: it should fetch data from monthly market expectations API (@test-focus-monthly.R#8) 
  7. Error: it should fetch data from monthly market expectations API without start_date (@test-focus-monthly.R#17) 
  8. Error: it should fetch data from monthly market expectations API without end_date (@test-focus-monthly.R#26) 
  9. Error: it should fetch data from quarterly market expectations API (@test-focus-quarterly.R#8) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted