Replace back link on budget results

This commit is contained in:
Alberto
2023-08-10 18:32:54 +02:00
parent 74b07def8f
commit b34cfaac1b
2 changed files with 7 additions and 1 deletions

View File

@@ -14,7 +14,7 @@
<div class="expanded no-margin-top padding header">
<div class="row">
<div class="small-12 column">
<%= back_link_to budgets_path %>
<%= back_link_to budget_path(@budget) %>
<h2 class="margin-top">
<%= t("budgets.results.heading") %><br>
<span><%= @budget.name %></span>

View File

@@ -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)