diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index 605309c1b..9646802d2 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -14,7 +14,7 @@
- <%= back_link_to budgets_path %> + <%= back_link_to budget_path(@budget) %>

<%= t("budgets.results.heading") %>
<%= @budget.name %> diff --git a/spec/system/budgets/results_spec.rb b/spec/system/budgets/results_spec.rb index b17618ef6..a3c7516aa 100644 --- a/spec/system/budgets/results_spec.rb +++ b/spec/system/budgets/results_spec.rb @@ -14,6 +14,12 @@ describe "Results" do Budget::Result.new(budget, heading).calculate_winners end + scenario "Back link redirects to budget page" do + visit budget_results_path(budget) + + expect(page).to have_link("Go back", href: budget_path(budget)) + end + scenario "No links to budget results with results disabled" do budget.update!(results_enabled: false)