-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip long running tests at request of CRAN
- Loading branch information
Showing
6 changed files
with
25 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Description: | |
government Open Data initiatives in Latin America and the USA. This package | ||
is a wrapper to make it easier to access data made public through the 'Junar' | ||
API. | ||
Version: 0.1.2 | ||
Version: 0.1.3 | ||
Date: 2017-08-08 | ||
Authors@R: c(person("Frans", "van Dunné", , | ||
"[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
library(junr) | ||
library(httr) | ||
|
||
base_url <- "http://api.datosabiertos.presidencia.go.cr/api/v2/datastreams/" | ||
api_key <- "0bd55e858409eefabc629b28b2e7916361ef20ff" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
library(junr) | ||
|
||
context("Utilities") | ||
|
||
base_url <- "http://api.datosabiertos.presidencia.go.cr/api/v2/datastreams/" | ||
api_key <- "0bd55e858409eefabc629b28b2e7916361ef20ff" | ||
|
||
currency_data <- get_data(base_url, api_key, "LICIT-ADJUD-POR-LOS-MINIS") | ||
|
||
test_that("The test endpoint is still valid", { | ||
expect_true(nrow(currency_data)>0) | ||
expect_true(!is.null(currency_data$`Monto Adjudicado`)) | ||
skip_on_cran() | ||
currency_data <- get_data(base_url, api_key, "LICIT-ADJUD-POR-LOS-MINIS") | ||
expect_true(nrow(currency_data)>0) | ||
expect_true(!is.null(currency_data$`Monto Adjudicado`)) | ||
}) | ||
|
||
test_that("Currency values are converted to numeric", { | ||
skip_on_cran() | ||
currency_data <- get_data(base_url, api_key, "LICIT-ADJUD-POR-LOS-MINIS") | ||
numeric_currency <- clean_currency(currency_data$`Monto Adjudicado`) | ||
expect_true(is.numeric(numeric_currency)) | ||
}) |