library(cepis) source(file.path("helper", "utils.R")) check( "a trailing slash is stripped from base_url", identical(cepis_client(base_url = "http://x/")$base_url, "http://x") ) check( "the user agent identifies the library", grepl("cepis-r/", cepis_client()$user_agent, fixed = TRUE) ) check( "max_attempts below one is rejected", inherits(caught(cepis_client(max_attempts = 0L)), "error") ) check( "a timeout of zero is rejected", inherits(caught(cepis_client(timeout = 0)), "error") ) check( "a total_timeout of zero is rejected", inherits(caught(cepis_client(total_timeout = 0)), "error") ) check( "the default base_url is the public API", identical(cepis_client()$base_url, "https://cep.is") )