diff --git a/NEWS.md b/NEWS.md index c81ec11d..16804010 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,13 +1,5 @@ # rsconnect (development version) -* Fixed redeployments to shinyapps.io where `appName` is provided, but no local - record of the deployment exists. (#932) - -* `deployApp()` and `writeManifest()` now error if your library and `renv.lock` - are out-of-sync. Previously it always used what was defined in the `renv.lock` - but that was (a) slow and (b) could lead to different results than what you - see when running locally (#930). - * Deploying from an renv project includes the `renv.lock` in the bundle. A manifest created for an renv project references the `renv.lock` in the `manifest.json`. (#926) diff --git a/tests/testthat/test-deploymentTarget.R b/tests/testthat/test-deploymentTarget.R index c686cad7..9f242b3c 100644 --- a/tests/testthat/test-deploymentTarget.R +++ b/tests/testthat/test-deploymentTarget.R @@ -187,46 +187,42 @@ test_that("default title is the empty string", { }) test_that("can find existing application on server & use it", { - for (server in c("example.com", "shinyapps.io")) { - local_temp_config() - addTestServer() - addTestAccount("ron", server = server) - local_mocked_bindings( - applications = function(...) data.frame( - name = "my_app", - id = 123, - url = "http://example.com/test", - stringsAsFactors = FALSE - ), - shouldUpdateApp = function(...) TRUE - ) - - app_dir <- withr::local_tempdir() - target <- deploymentTarget(app_dir, appName = "my_app", server = server) - expect_equal(target$appId, 123) - } + local_temp_config() + addTestServer() + addTestAccount("ron") + local_mocked_bindings( + applications = function(...) data.frame( + name = "my_app", + id = 123, + url = "http://example.com/test", + stringsAsFactors = FALSE + ), + shouldUpdateApp = function(...) TRUE + ) + + app_dir <- withr::local_tempdir() + target <- deploymentTarget(app_dir, appName = "my_app") + expect_equal(target$appId, 123) }) test_that("can find existing application on server & not use it", { - for (server in c("example.com", "shinyapps.io")) { - local_temp_config() - addTestServer() - addTestAccount("ron", server = server) - local_mocked_bindings( - applications = function(...) data.frame( - name = "my_app", - id = 123, - url = "http://example.com/test", - stringsAsFactors = FALSE - ), - shouldUpdateApp = function(...) FALSE - ) - - app_dir <- withr::local_tempdir() - target <- deploymentTarget(app_dir, appName = "my_app", server = server) - expect_equal(target$appName, "my_app-1") - expect_equal(target$appId, NULL) - } + local_temp_config() + addTestServer() + addTestAccount("ron") + local_mocked_bindings( + applications = function(...) data.frame( + name = "my_app", + id = 123, + url = "http://example.com/test", + stringsAsFactors = FALSE + ), + shouldUpdateApp = function(...) FALSE + ) + + app_dir <- withr::local_tempdir() + target <- deploymentTarget(app_dir, appName = "my_app") + expect_equal(target$appName, "my_app-1") + expect_equal(target$appId, NULL) }) # defaultAppName ----------------------------------------------------------