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")
})
markrobinsonuzh/iCOBRA documentation built on March 28, 2024, 2:01 p.m.