From f563fc0b246a3e18d94339d7576e4af5fa5f3034 Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 3 Nov 2023 10:57:24 +0100 Subject: [PATCH] Replace back link on budget executions --- app/views/budgets/executions/show.html.erb | 2 +- spec/system/budgets/executions_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/budgets/executions/show.html.erb b/app/views/budgets/executions/show.html.erb index acb4f3822..dc4748239 100644 --- a/app/views/budgets/executions/show.html.erb +++ b/app/views/budgets/executions/show.html.erb @@ -15,7 +15,7 @@
- <%= back_link_to budgets_path %> + <%= back_link_to budget_path(@budget) %>

<%= t("budgets.executions.heading") %>
<%= @budget.name %> diff --git a/spec/system/budgets/executions_spec.rb b/spec/system/budgets/executions_spec.rb index d9a789434..5b721e257 100644 --- a/spec/system/budgets/executions_spec.rb +++ b/spec/system/budgets/executions_spec.rb @@ -76,6 +76,12 @@ describe "Executions" do expect(page).to have_content("No winner investments in this state") end + scenario "Back link redirects to budget page" do + visit budget_executions_path(budget) + + expect(page).to have_link("Go back", href: budget_path(budget)) + end + context "Images" do scenario "renders milestone image if available" do milestone1 = create(:milestone, :with_image, milestoneable: investment1)