Skip to content

Commit

Permalink
shorten tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mps9506 committed Aug 5, 2018
1 parent de7aa0b commit 196b106
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-expected_errors.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ context("core functions return expected errors")

test_that("core functions returns expected errors", {
expect_error(echoAirGetFacilityInfo(), "No valid arguments supplied")
expect_error(echoAirGetFacilityInfo(p_pid = "NC0000003706500036", output = "JSON", verbose = FALSE))
expect_error(echoAirGetFacilityInfo(p_pid = "NC0000003706500036", output = "JSON"))
expect_error(echoGetReports(program = "sdw"))
expect_error(echoSDWGetSystems())

Expand Down
9 changes: 6 additions & 3 deletions tests/testthat/test-expected_objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ test_that("core functions return tbl_df", {

skip_on_cran()

x <- echoAirGetFacilityInfo(p_pid = "NC0000003706500036", output = "df", verbose = FALSE)
x <- echoAirGetFacilityInfo(p_pid = "NC0000003706500036", output = "df",
qcolumns = "3,4,5")
expect_s3_class(x, "tbl_df")

x <- echoSDWGetMeta(verbose = FALSE)
Expand All @@ -30,7 +31,8 @@ test_that("core functions return tbl_df", {
x <- echoSDWGetSystems(p_co = "Brazos", p_st = "tx", verbose = FALSE)
expect_s3_class(x, "tbl_df")

x <- echoWaterGetFacilityInfo(p_pid = "ALR040033", output = "df", verbose = FALSE)
x <- echoWaterGetFacilityInfo(p_pid = "ALR040033", output = "df",
qcolumns = "3,4,5")
expect_s3_class(x, "tbl_df")

x <- echoWaterGetParams(term = "Oxygen, dissolved")
Expand All @@ -39,7 +41,8 @@ test_that("core functions return tbl_df", {
x <- echoWaterGetParams(code = "00300")
expect_s3_class(x, "tbl_df")

x <- echoGetFacilities(program = "cwa", p_pid = "ALR040033", output = "df", verbose = FALSE, qcolumns = "1,2,3")
x <- echoGetFacilities(program = "cwa", p_pid = "ALR040033", output = "df",
qcolumns = "1,2,3")
expect_s3_class(x, "tbl_df")

})
Expand Down

0 comments on commit 196b106

Please sign in to comment.