From e4f91d4eeec55ec23a0f6eccd6c7e2747e12c808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Magnusson?= Date: Sat, 22 Nov 2014 16:13:04 +0100 Subject: [PATCH] Small update and added tests --- DESCRIPTION | 4 ++-- R/api_parameters.R | 2 -- tests/testthat/test-get_pxweb_data.R | 13 +++++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 908812eb..d2b26d41 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: pxweb Type: Package Title: R interface to the PX-Web/PC-Axis API -Version: 0.5.2 -Date: 2014-11-21 +Version: 0.5.3 +Date: 2014-11-22 Author: Mans Magnusson, Leo Lahti, Love Hansson Maintainer: Mans Magnusson Description: Generic interface for the PX-Web/PC-Axis API. The PX-Web/PC-Axis diff --git a/R/api_parameters.R b/R/api_parameters.R index 3940f8f1..9143535b 100644 --- a/R/api_parameters.R +++ b/R/api_parameters.R @@ -7,8 +7,6 @@ #' @examples api_parameters() api_parameters <- function(url = NULL) { - warning("api_parameters() is depricated, please use api_catalogue()") - api.list <- get_api_list() # If API is specified, pick the parameters diff --git a/tests/testthat/test-get_pxweb_data.R b/tests/testthat/test-get_pxweb_data.R index a0166571..1bdec565 100644 --- a/tests/testthat/test-get_pxweb_data.R +++ b/tests/testthat/test-get_pxweb_data.R @@ -148,3 +148,16 @@ test_that(desc="get_pxweb_data()",{ } }) +test_that(desc="Test warnings",{ + + skip_on_cran() + + expect_that({ + test_url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/TK/TK1001/TK1001S/SnabbStatTK1001" + test_dims <- list("ContentsCode" = c("TK1001AE"), "Tid" = c("2014M02")) + test_data <- + get_pxweb_data(url = test_url, + dims = test_dims, + clean = TRUE)}, + not(gives_warning())) +}) \ No newline at end of file