Skip to content

Commit

Permalink
reenabled failed match.arg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SymbolixAU committed Jun 9, 2016
1 parent edf02cf commit c368c4e
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tests/testthat/test-google_directions.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ test_that("google_directions returns data.frame", {
expect_equal(length(df[[1]]), 3)
})

# test_that("incorrect mode throws error", {
#
# expect_error(google_directions(origin = c(-37.8179746, 144.9668636),
# destination = c(-37.81659, 144.9841),
# mode = "non-mode",
# key = "abc",
# output_format = "data.frame"),
# "'arg' should be one of driving”, “walking”, “bicycling”, “transit")
#
# })
#
# test_that("incorrect output throws warning",{
#
# expect_error(google_directions(origin = c(-37.8179746, 144.9668636),
# destination = c(-37.81659, 144.9841),
# mode = "driving",
# key = "abc",
# output_format = "non-output"),
# "'arg' should be one of data.frame”, “JSON")
#
# })
test_that("incorrect mode throws error", {

expect_error(google_directions(origin = c(-37.8179746, 144.9668636),
destination = c(-37.81659, 144.9841),
mode = "non-mode",
key = "abc",
output_format = "data.frame"),
"'arg' should be one of \"driving\", \"walking\", \"bicycling\", \"transit\"")

})

test_that("incorrect output throws warning",{

expect_error(google_directions(origin = c(-37.8179746, 144.9668636),
destination = c(-37.81659, 144.9841),
mode = "driving",
key = "abc",
output_format = "non-output"),
"'arg' should be one of \"data.frame\", \"JSON\"")

})

test_that("origin is lat/lon", {

Expand Down

0 comments on commit c368c4e

Please sign in to comment.