Merge pull request #1888 from consul/flaky-specs

Fixes some flaky specs
This commit is contained in:
BertoCQ
2017-09-19 16:43:41 +02:00
committed by GitHub
7 changed files with 15 additions and 107 deletions

View File

@@ -390,13 +390,10 @@ feature 'Admin budget investments' do
budget_investment2 = create(:budget_investment)
visit admin_budget_budget_investment_path(budget_investment2.budget, budget_investment2)
click_link 'Edit classification'
visit edit_admin_budget_budget_investment_path(budget_investment2.budget, budget_investment2)
find('.js-add-tag-link', text: 'Education').click
fill_in 'budget_investment_title', with: 'Updated title'
click_button 'Update'
expect(page).to have_content 'Investment project updated succesfully.'

View File

@@ -9,8 +9,15 @@ feature 'Admin legislation questions' do
context "Feature flag" do
scenario 'Disabled with a feature flag' do
background do
Setting['feature.legislation'] = nil
end
after do
Setting['feature.legislation'] = true
end
scenario 'Disabled with a feature flag' do
process = create(:legislation_process)
expect{ visit admin_legislation_process_questions_path(process) }.to raise_exception(FeatureFlags::FeatureDisabled)
end