Skip to content

Commit

Permalink
Skip tests that require authentication (fixes #174)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklucius committed Jun 21, 2019
1 parent fcf63e3 commit e9716db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-all.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ library(mime)
library(plyr)

## Credentials for testing private dataset and update dataset functionality ##
# This is commented out because of issue #174 as a temporary work-around.
# This should be re-enabled in the future with a work-around.
socrataEmail <- Sys.getenv("SOCRATA_EMAIL", "[email protected]")
socrataPassword <- Sys.getenv("SOCRATA_PASSWORD", "7vFDsGFDUG")

Expand Down Expand Up @@ -457,6 +459,7 @@ privateResourceToReadCsvUrl <- "https://soda.demo.socrata.com/resource/a9g2-feh2
privateResourceToReadJsonUrl <- "https://soda.demo.socrata.com/resource/a9g2-feh2.json"

test_that("read Socrata CSV that requires a login", {
skip('See Issue #174')
# should error when no email and password are sent with the request
expect_error(read.socrata(url = privateResourceToReadCsvUrl))
# try again, this time with email and password in the request
Expand All @@ -467,6 +470,7 @@ test_that("read Socrata CSV that requires a login", {
})

test_that("read Socrata JSON that requires a login", {
skip('See Issue #174')
# should error when no email and password are sent with the request
expect_error(read.socrata(url = privateResourceToReadJsonUrl))
# try again, this time with email and password in the request
Expand All @@ -479,6 +483,7 @@ test_that("read Socrata JSON that requires a login", {
context("write Socrata datasets")

test_that("add a row to a dataset", {
skip('See Issue #174')
datasetToAddToUrl <- "https://soda.demo.socrata.com/resource/xh6g-yugi.json"

# populate df_in with two columns, each with a random number
Expand All @@ -496,6 +501,7 @@ test_that("add a row to a dataset", {


test_that("fully replace a dataset", {
skip('See Issue #174')
datasetToReplaceUrl <- "https://soda.demo.socrata.com/resource/kc76-ybeq.json"

# populate df_in with two columns of random numbers
Expand Down

0 comments on commit e9716db

Please sign in to comment.