From cf10925adb0c99dc0f0dd11712f8132672eb5c60 Mon Sep 17 00:00:00 2001 From: nikosbosse Date: Wed, 30 Oct 2024 22:21:02 +0100 Subject: [PATCH] add test --- tests/testthat/test-get-forecast-type.R | 5 +++++ 1 file changed, 5 insertions(+) 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") })