From 39fa6ec2deae074cd77ceda0e4dc8d1120eebbcc Mon Sep 17 00:00:00 2001 From: Bertocq Date: Tue, 4 Jul 2017 23:46:14 +0200 Subject: [PATCH] Increase admin investment feature to cover selected checkbox --- spec/features/admin/budget_investments_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 375a09770..57dedcb54 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -312,7 +312,7 @@ feature 'Admin budget investments' do context "Edit" do scenario "Change title, incompatible, description or heading" do - budget_investment = create(:budget_investment) + budget_investment = create(:budget_investment, :selected) create(:budget_heading, group: budget_investment.group, name: "Barbate") visit admin_budget_budget_investment_path(budget_investment.budget, budget_investment) @@ -322,6 +322,7 @@ feature 'Admin budget investments' do fill_in 'budget_investment_description', with: 'Carrots' select "#{budget_investment.group.name}: Barbate", from: 'budget_investment[heading_id]' check "budget_investment_incompatible" + check "budget_investment_selected" click_button 'Update' @@ -329,6 +330,7 @@ feature 'Admin budget investments' do expect(page).to have_content 'Carrots' expect(page).to have_content 'Barbate' expect(page).to have_content 'Incompatible' + expect(page).to have_content 'Selected' end scenario "Add administrator" do