Merge branch 'master' of github.com:consul/consul into update-dependencies

This commit is contained in:
Alberto Garcia Cabeza
2017-03-27 11:44:33 +02:00
3 changed files with 16 additions and 6 deletions

View File

@@ -225,7 +225,7 @@ class Budget
def should_show_aside?
(budget.selecting? && !unfeasible?) ||
(budget.balloting? && feasible?) ||
(budget.valuating? && feasible?)
(budget.valuating? && !unfeasible?)
end
def should_show_votes?

View File

@@ -36,7 +36,6 @@
</label>
<%= text_field_tag 'advanced_search[date_min]',
params[:advanced_search].try(:[], :date_min),
type: "date",
class: 'js-calendar' %>
</div>
<div class='small-12 large-6 column'>
@@ -45,7 +44,6 @@
</label>
<%= text_field_tag 'advanced_search[date_max]',
params[:advanced_search].try(:[], :date_max),
type: "date",
class: 'js-calendar' %>
</div>
</div>

View File

@@ -405,7 +405,7 @@ feature 'Budget Investments' do
budget.update(phase: "valuating")
end
scenario "Sidebar in show should display supports text and supports" do
scenario "Sidebar in show should display support text and count" do
investment = create(:budget_investment, :selected, budget: budget)
create(:vote, votable: investment)
@@ -417,8 +417,8 @@ feature 'Budget Investments' do
end
end
scenario "Index should display supports" do
investment = create(:budget_investment, :selected, budget: budget, heading: heading)
scenario "Index should display support count" do
investment = create(:budget_investment, budget: budget, heading: heading)
create(:vote, votable: investment)
visit budget_investments_path(budget, heading_id: heading.id)
@@ -428,6 +428,18 @@ feature 'Budget Investments' do
end
end
scenario "Show should display support text and count" do
investment = create(:budget_investment, budget: budget, heading: heading)
create(:vote, votable: investment)
visit budget_investment_path(budget, investment)
within("#budget_investment_#{investment.id}") do
expect(page).to have_content "Supports"
expect(page).to have_content "1 support"
end
end
end
context "Balloting Phase" do