|
|
@ -1,6 +1,8 @@
|
|
|
|
context("measurements")
|
|
|
|
context("measurements")
|
|
|
|
|
|
|
|
|
|
|
|
check_api <- function() {
|
|
|
|
check_api <- function() {
|
|
|
|
|
|
|
|
skip_on_cran()
|
|
|
|
|
|
|
|
|
|
|
|
code <- NA
|
|
|
|
code <- NA
|
|
|
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
|
|
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
|
|
|
if (is.na(code)) skip("API not available")
|
|
|
|
if (is.na(code)) skip("API not available")
|
|
|
@ -10,7 +12,6 @@ try({
|
|
|
|
boxes <- osem_boxes()
|
|
|
|
boxes <- osem_boxes()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test_that("measurements can be retrieved for a phenomenon", {
|
|
|
|
test_that("measurements can be retrieved for a phenomenon", {
|
|
|
|
check_api()
|
|
|
|
check_api()
|
|
|
|
|
|
|
|
|
|
|
|