Skip to content

Commit

Permalink
chore: add a test to check if FilterData object is created for limite…
Browse files Browse the repository at this point in the history
…d datasets
  • Loading branch information
vedhav committed Oct 8, 2024
1 parent 1d367ac commit e8e6a11
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ test_that("teal_data_to_filtered_data return FilteredData class", {
testthat::expect_s3_class(teal_data_to_filtered_data(teal_data), "FilteredData")
})

testthat("teal_data_to_filtered_data creates FilterData class with datanames that are passed", {
teal_data <- within(
teal.data::teal_data(),
{
iris <- head(iris)
mtcars <- head(mtcars)
}
)
teal.data::datanames(teal_data) <- "iris"

fd <- teal_data_to_filtered_data(teal_data)
testthat::expect_equal(fd$datanames(), "iris")
})

test_that("validate_app_title_tag works on validating the title tag", {
valid_title <- tags$head(
tags$title("title"),
Expand Down

0 comments on commit e8e6a11

Please sign in to comment.