From fce60b9d9ac33cafd39677b6505f2a696f8e25c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Tue, 9 May 2017 13:14:03 +0200 Subject: [PATCH] changes heading amount info into a link in ballot view --- app/views/budgets/ballot/_ballot.html.erb | 5 +++-- spec/features/budgets/ballots_spec.rb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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