Skip to content

Commit

Permalink
Updated testthat.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGoring committed Sep 20, 2020
1 parent e7c06f8 commit 3b7abc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test_neotoma.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
# context('The API itself is working properly')
# test_that('The API is returning data as expected from its documentation',
# {
# aa <- jsonlite::fromJSON(httr::content(httr::GET('http://api.neotomadb.org/v1/data/datasets?siteid=1'), as = 'text'))
# bb <- jsonlite::fromJSON(httr::content(httr::GET('http://api.neotomadb.org/v1/data/datasets?gpid=756'), as = 'text'))
# aa <- jsonlite::fromJSON(httr::content(httr::GET('http://wnapi.neotomadb.org/v1/data/datasets?siteid=1'), as = 'text'))
# bb <- jsonlite::fromJSON(httr::content(httr::GET('http://wnapi.neotomadb.org/v1/data/datasets?gpid=756'), as = 'text'))
# expect_is(aa, 'list')
# expect_is(bb, 'list')
# expect_equal(length(aa), 2)
# expect_equal(aa[[1]], 1)
# expect_more_than(length(aa[[2]]), 0)
# expect_equal(jsonlite::fromJSON(httr::content(httr::GET('http://api.neotomadb.org/v1/data/datasets?banana'), as = 'text'))[[1]], 0)
# expect_equal(jsonlite::fromJSON(httr::content(httr::GET('http://wnapi.neotomadb.org/v1/data/datasets?banana'), as = 'text'))[[1]], 0)
# expect_equal(bb[[1]], 1)
# expect_more_than(length(bb[[2]]), 0)
# })
Expand Down

0 comments on commit 3b7abc3

Please sign in to comment.