diff --git a/app/views/budgets/ballot/_ballot.html.erb b/app/views/budgets/ballot/_ballot.html.erb index bfaa98768..da30591f8 100644 --- a/app/views/budgets/ballot/_ballot.html.erb +++ b/app/views/budgets/ballot/_ballot.html.erb @@ -28,8 +28,9 @@ <%= group.name %> - <%= @ballot.heading_for_group(group).name %> - <%= t("budgets.ballots.show.remaining", - amount: @ballot.formatted_amount_available(@ballot.heading_for_group(group))).html_safe %> + <%= link_to t("budgets.ballots.show.remaining", + amount: @ballot.formatted_amount_available(@ballot.heading_for_group(group))).html_safe, + budget_group_path(@budget, group) %> <% if @ballot.has_lines_in_group?(group) %> diff --git a/spec/features/budgets/ballots_spec.rb b/spec/features/budgets/ballots_spec.rb index b789fcb86..11623d23b 100644 --- a/spec/features/budgets/ballots_spec.rb +++ b/spec/features/budgets/ballots_spec.rb @@ -340,7 +340,7 @@ feature 'Ballots' do within("#budget_group_#{group1.id}") do expect(page).to have_content "#{group1.name} - #{heading1.name}" expect(page).to have_content "Amount spent €20" - expect(page).to have_content "You still have €80 to invest" + expect(page).to have_link "You still have €80 to invest.", href: budget_group_path(budget, group1) end within("#budget_group_#{group2.id}") do