summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-04-24 08:33:24 -0700
committerStan Hu <stanhu@gmail.com>2015-04-24 08:33:24 -0700
commit2f045997516a11622a7c7229ac08ac0d288813df (patch)
tree8e56883b8cc6bf2f726b99caec7414c05dbe0c84 /features
parent62117f2f25646009fb5b20d7a215d7d697ce3231 (diff)
downloadgitlab-ce-2f045997516a11622a7c7229ac08ac0d288813df.tar.gz
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
Diffstat (limited to 'features')
-rw-r--r--features/admin/settings.feature3
-rw-r--r--features/steps/admin/settings.rb13
2 files changed, 15 insertions, 1 deletions
diff --git a/features/admin/settings.feature b/features/admin/settings.feature
index 52e47307b23..e38eea2cfed 100644
--- a/features/admin/settings.feature
+++ b/features/admin/settings.feature
@@ -11,6 +11,9 @@ Feature: Admin Settings
Scenario: Change Slack Service Template settings
When I click on "Service Templates"
And I click on "Slack" service
+ And I fill out Slack settings
Then I check all events and submit form
And I should see service template settings saved
+ Then I click on "Slack" service
And I should see all checkboxes checked
+ And I should see Slack settings saved
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