Skip to content

Commit

Permalink
write a test for #25
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Feb 11, 2019
1 parent d127c85 commit ac05019
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-evaluate-smooth-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ test_that("evaluate_smooth throws a message with more than one term", {
"Supplied more than 1 'smooth'; using only the first")
})

test_that("evaluate_smooth throws error if smooth not found", {
expect_error(evaluate_smooth(m1, smooth = "s(z)"),
"Requested smooth 's(z)' not found",
fixed = TRUE)
})

test_that("evaluate_smooth works for a GAMM", {
sm <- evaluate_smooth(m2, "s(x2)")
expect_is(sm, "evaluated_1d_smooth")
Expand Down

0 comments on commit ac05019

Please sign in to comment.