Commit 460aa917 authored by Tom Reynkens's avatar Tom Reynkens

Test for explicit error

parent 9d43db9b
Type: Package
Package: smurf
Title: Sparse Multi-Type Regularized Feature Modeling
Version: 0.3.0.9026
Version: 0.3.0.9027
Date: 2018-09-24
Authors@R: c(
person("Tom", "Reynkens", email = "tomreynkens@hotmail.com", role = c("aut", "cre"),
......
......@@ -312,7 +312,9 @@ test_that("Test predict and predict_reest", {
"Coefficients of the re-estimated model are not present in 'object', coefficients of the estimated model are used.")
# Check if error since no X matrix in output
expect_error(predict(munich.fit2, type = "terms"))
expect_error(predict(munich.fit2, type = "terms"),
"Terms cannot be predicted when 'object' does not contain 'X'.
Please provide the data in 'newdata' or use the glmsmurf function with option 'x = TRUE'.")
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment