tests/testthat/test_app.R

## Test shiny app

library(iCOBRA)
context("Check that shiny app is generated")

test_that("Shiny app is generated", {
  expect_warning({
    expect_is(COBRAapp(), "shiny.appobj")
  }, "expect a collection of")
  expect_warning({
    expect_is(COBRAapp(cobradata_example), "shiny.appobj")
  }, "expect a collection of")

  expect_warning({
    expect_is(COBRAapp(autorun = TRUE), "shiny.appobj")
  }, "expect a collection of")
  expect_warning({
    expect_is(COBRAapp(cobradata_example, autorun = TRUE), "shiny.appobj")
  }, "expect a collection of")
})
csoneson/iCOBRA documentation built on May 18, 2024, 2:07 a.m.