Merge pull request #1525 from consul/ballot-reviewing
Display correct heading name when reviewing ballot
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
<div id="<%= dom_id(group) %>"
|
<div id="<%= dom_id(group) %>"
|
||||||
class="small-12 medium-6 column">
|
class="small-12 medium-6 column">
|
||||||
<h3 class="subtitle">
|
<h3 class="subtitle">
|
||||||
<%= group.name %> - <%= group.headings.first.name %>
|
<%= group.name %> - <%= @ballot.heading_for_group(group).name %>
|
||||||
</h3>
|
</h3>
|
||||||
<% if @ballot.has_lines_in_group?(group) %>
|
<% if @ballot.has_lines_in_group?(group) %>
|
||||||
<h4 class="amount-spent text-right">
|
<h4 class="amount-spent text-right">
|
||||||
|
|||||||
@@ -313,12 +313,14 @@ feature 'Ballots' do
|
|||||||
expect(current_path).to eq(budget_investments_path(budget))
|
expect(current_path).to eq(budget_investments_path(budget))
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Displaying the correct count & amount' do
|
scenario 'Displaying the correct group, heading, count & amount' do
|
||||||
group1 = create(:budget_group, budget: budget)
|
group1 = create(:budget_group, budget: budget)
|
||||||
group2 = create(:budget_group, budget: budget)
|
group2 = create(:budget_group, budget: budget)
|
||||||
|
|
||||||
|
create(:budget_heading, name: "District A", group: group1, price: 100)
|
||||||
heading1 = create(:budget_heading, name: "District 1", group: group1, price: 100)
|
heading1 = create(:budget_heading, name: "District 1", group: group1, price: 100)
|
||||||
heading2 = create(:budget_heading, name: "District 2", group: group2, price: 50)
|
heading2 = create(:budget_heading, name: "District 2", group: group2, price: 50)
|
||||||
|
create(:budget_heading, name: "District Z", group: group1, price: 100)
|
||||||
|
|
||||||
investment1 = create(:budget_investment, :selected, price: 10, heading: heading1)
|
investment1 = create(:budget_investment, :selected, price: 10, heading: heading1)
|
||||||
investment2 = create(:budget_investment, :selected, price: 10, heading: heading1)
|
investment2 = create(:budget_investment, :selected, price: 10, heading: heading1)
|
||||||
|
|||||||
Reference in New Issue
Block a user