diff --git a/tests/testthat/test-get-forecast-type.R b/tests/testthat/test-get-forecast-type.R index 51deb134..0368f280 100644 --- a/tests/testthat/test-get-forecast-type.R +++ b/tests/testthat/test-get-forecast-type.R @@ -21,6 +21,11 @@ test_that("get_forecast_type() works as expected", { get_forecast_type(test), "Input is not a valid forecast object", ) + + # get_forecast_type() should still work even if a new class is added + testclassobject <- data.table::copy(example_quantile) + class(testclassobject) <- c("something", class(testclassobject)) + expect_equal(get_forecast_type(testclassobject), "quantile") })