From 472d163cc7be909514c96000260c48fa623a45d8 Mon Sep 17 00:00:00 2001 From: Igor Alexandrov Date: Fri, 27 Sep 2024 19:15:42 +0400 Subject: [PATCH] Assert 404 after app is stopped --- test/integration/app_test.rb | 2 +- test/integration/integration_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/integration/app_test.rb b/test/integration/app_test.rb index 40a896b1..7112be9e 100644 --- a/test/integration/app_test.rb +++ b/test/integration/app_test.rb @@ -8,7 +8,7 @@ class AppTest < IntegrationTest kamal :app, :stop - assert_app_is_down + assert_app_not_found kamal :app, :start diff --git a/test/integration/integration_test.rb b/test/integration/integration_test.rb index ad99f3e2..e4dceb29 100644 --- a/test/integration/integration_test.rb +++ b/test/integration/integration_test.rb @@ -50,6 +50,12 @@ class IntegrationTest < ActiveSupport::TestCase assert_equal "502", response.code end + def assert_app_not_found + response = app_response + debug_response_code(response, "404") + assert_equal "404", response.code + end + def assert_app_is_up(version: nil, app: @app) response = app_response(app: app) debug_response_code(response, "200")