From f46836fb360237a6212816bb70a99bbf45390ea3 Mon Sep 17 00:00:00 2001 From: Efe Date: Sun, 25 Oct 2026 21:38:28 +0300 Subject: [PATCH] Fix previous deploy links to use type-specific pages --- app/views/shipit/stacks/show.html.erb | 2 +- test/controllers/stacks_controller_test.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/shipit/stacks/show.html.erb b/app/views/shipit/stacks/show.html.erb index 35035830b..2c8f774ba 100644 --- a/app/views/shipit/stacks/show.html.erb +++ b/app/views/shipit/stacks/show.html.erb @@ -36,7 +36,7 @@

Previous Deploys

<% end %> diff --git a/test/controllers/stacks_controller_test.rb b/test/controllers/stacks_controller_test.rb index 5e68f557c..29a32ade9 100644 --- a/test/controllers/stacks_controller_test.rb +++ b/test/controllers/stacks_controller_test.rb @@ -83,6 +83,15 @@ class StacksControllerTest < ActionController::TestCase assert_response :ok end + test "#show links deploys, rollbacks, and tasks to their own pages" do + get :show, params: { id: @stack.to_param } + + assert_response :ok + assert_select ".commit-list a[href='#{stack_deploy_path(@stack, shipit_tasks(:shipit))}']" + assert_select ".commit-list a[href='#{stack_deploy_path(@stack, shipit_tasks(:shipit_rollback))}']" + assert_select ".commit-list a[href='#{stack_task_path(@stack, shipit_tasks(:shipit_restart))}']" + end + test "#show with faulty and validating deploys is success" do get :show, params: { id: shipit_stacks(:shipit_canaries).to_param } assert_response :ok