From 2f045997516a11622a7c7229ac08ac0d288813df Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 24 Apr 2015 08:33:24 -0700 Subject: Fix bug where Slack service channel was not saved in admin template settings. Consolidate allowed parameters in one place to avoid these kinds of bugs in the future. Closes https://github.com/gitlabhq/gitlabhq/issues/9181 --- features/steps/admin/settings.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'features/steps/admin') diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb index 87d4e969ff5..15ca0d80f1a 100644 --- a/features/steps/admin/settings.rb +++ b/features/steps/admin/settings.rb @@ -31,10 +31,15 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps page.check('Comments') page.check('Issues events') page.check('Merge Request events') - fill_in 'Webhook', with: "http://localhost" click_on 'Save' end + step 'I fill out Slack settings' do + fill_in 'Webhook', with: 'http://localhost' + fill_in 'Username', with: 'test_user' + fill_in 'Channel', with: '#test_channel' + end + step 'I should see service template settings saved' do page.should have_content 'Application settings saved successfully' end @@ -44,4 +49,10 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps checkbox.should be_checked end end + + step 'I should see Slack settings saved' do + find_field('Webhook').value.should eq 'http://localhost' + find_field('Username').value.should eq 'test_user' + find_field('Channel').value.should eq '#test_channel' + end end -- cgit v1.2.1