changes heading amount info into a link in ballot view

This commit is contained in:
Juanjo Bazán
2017-05-09 13:14:03 +02:00
parent ea3057bc04
commit fce60b9d9a
2 changed files with 4 additions and 3 deletions

View File

@@ -28,8 +28,9 @@
<%= group.name %> - <%= @ballot.heading_for_group(group).name %>
</h3>
<strong>
<%= 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) %>
</strong>
</div>
<% if @ballot.has_lines_in_group?(group) %>

View File

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