diff --git a/R/ViewShiny.R b/R/ViewShiny.R index 82a432f..b950395 100644 --- a/R/ViewShiny.R +++ b/R/ViewShiny.R @@ -149,22 +149,13 @@ viewChars <- function( databaseSettings$cgTablePrefix <- databaseSettings$cohortTablePrefix databaseSettings$databaseTable <- "DATABASE_META_DATA" databaseSettings$databaseTablePrefix <- "" - # databaseSettings$iTablePrefix <- databaseSettings$incidenceTablePrefix databaseSettings$cgTable <- "cohort_definition" - if (!testApp) { OhdsiShinyAppBuilder::viewShiny( config = config, connection = connection, resultDatabaseSettings = databaseSettings ) - } else { - OhdsiShinyAppBuilder::createShinyApp( - config = config, - connection = connection, - resultDatabaseSettings = databaseSettings - ) - } } diff --git a/tests/testthat/test-viewShiny.R b/tests/testthat/test-viewShiny.R index 10fba8e..d519ad3 100644 --- a/tests/testthat/test-viewShiny.R +++ b/tests/testthat/test-viewShiny.R @@ -125,26 +125,3 @@ test_that("prepareCharacterizationShiny works", { testthat::expect_true("cg_cohort_definition" %in% tables) testthat::expect_true("database_meta_data" %in% tables) }) - -test_that("shiny app works", { - settings <- prepareCharacterizationShiny( - resultFolder = file.path(resultLocation, "result"), - cohortDefinitionSet = NULL, - sqliteLocation = file.path(resultLocation, "sqliteCharacterization", "sqlite.sqlite") - ) - - app <- viewChars( - databaseSettings = settings, - testApp = T - ) - - shiny::testServer( - app = app, - args = list(), - expr = { - testthat::expect_equal(runServer[["About"]], 0) - session$setInputs(menu = "About") - testthat::expect_equal(runServer[["About"]], 1) - } - ) -})