Skip to content

Commit

Permalink
Small update and added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MansMeg committed Nov 22, 2014
1 parent 8ccca06 commit e4f91d4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Description: Generic interface for the PX-Web/PC-Axis API. The PX-Web/PC-Axis
Expand Down
2 changes: 0 additions & 2 deletions R/api_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions tests/testthat/test-get_pxweb_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
})

0 comments on commit e4f91d4

Please sign in to comment.