Skip to content

Commit

Permalink
Unit test for #147 - should fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Lucius authored and Nick Lucius committed Dec 5, 2017
1 parent df43af1 commit db5ecda
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-all.R
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,17 @@ test_that("incorrect API Query Human Readable", {
expect_equal(9, ncol(df), label="columns")
})

context("URL suffixes from Socrata are handled")

test_that("Handle /data suffix", {
df1 <- read.socrata('https://soda.demo.socrata.com/dataset/USGS-Earthquake-Reports/4334-bgaj/data')
expect_equal(1007, nrow(df1), label="rows")
expect_equal(9, ncol(df1), label="columns")
df2 <- read.socrata('https://soda.demo.socrata.com/dataset/USGS-Earthquake-Reports/4334-bgaj/data/')
expect_equal(1007, nrow(df2), label="rows")
expect_equal(9, ncol(df2), label="columns")
})

context("ls.socrata functions correctly")

test_that("List datasets available from a Socrata domain", {
Expand Down

0 comments on commit db5ecda

Please sign in to comment.