fixes specs

This commit is contained in:
rgarcia
2017-01-13 16:37:39 +01:00
parent b2b9954e6d
commit 17946b292b
4 changed files with 9 additions and 5 deletions

View File

@@ -34,6 +34,10 @@ class Management::Budgets::InvestmentsController < Management::BaseController
def vote
@investment.register_selection(managed_user)
load_investment_votes(@investment)
respond_to do |format|
format.html { redirect_to management_budget_investments_path(heading_id: @investment.heading.id) }
format.js
end
end
def print

View File

@@ -296,7 +296,7 @@ feature 'Budget Investments' do
context "Popup alert to vote only in one heading per group" do
scenario "When supporting in the first heading group", :js, :focus do
scenario "When supporting in the first heading group", :js do
carabanchel = create(:budget_heading, group: group)
salamanca = create(:budget_heading, group: group)
@@ -310,7 +310,7 @@ feature 'Budget Investments' do
end
end
scenario "When already supported in the group", :js, :focus do
scenario "When already supported in the group", :js do
carabanchel = create(:budget_heading, group: group)
salamanca = create(:budget_heading, group: group)
@@ -327,7 +327,7 @@ feature 'Budget Investments' do
end
end
scenario "When supporting in another group", :js, :focus do
scenario "When supporting in another group", :js do
carabanchel = create(:budget_heading, group: group)
another_heading = create(:budget_heading, group: create(:budget_group, budget: budget))

View File

@@ -55,7 +55,7 @@ feature 'Votes' do
feature 'Single spending proposal' do
background do
@investment = create(:budget_investment, budget: budget)
@investment = create(:budget_investment, budget: budget, heading: heading)
end
scenario 'Show no votes' do

View File

@@ -140,7 +140,7 @@ feature 'Budget Investments' do
context "Supporting" do
scenario 'Supporting budget investments on behalf of someone in index view', :js do
budget_investment = create(:budget_investment, budget: @budget)
budget_investment = create(:budget_investment, budget: @budget, heading: @heading)
user = create(:user, :level_two)
login_managed_user(user)