summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-19 22:12:30 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-19 22:12:30 +0100
commite06f88effa842c73d3827593f8d28846207bfca0 (patch)
tree36071dc6ca49d9b46f88611071a3088b61b70a7e /spec
parent298d05a5c3cc3c2f1daa4d77c45f9c90b53248df (diff)
downloadgitlab-ce-e06f88effa842c73d3827593f8d28846207bfca0.tar.gz
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/services/slack_slash_command_spec.rb36
1 files changed, 14 insertions, 22 deletions
diff --git a/spec/features/projects/services/slack_slash_command_spec.rb b/spec/features/projects/services/slack_slash_command_spec.rb
index 70e203efcf5..32b32f7ae8e 100644
--- a/spec/features/projects/services/slack_slash_command_spec.rb
+++ b/spec/features/projects/services/slack_slash_command_spec.rb
@@ -12,37 +12,29 @@ feature 'Slack slash commands', feature: true do
login_as(user)
end
- scenario 'user visits the slack slash command config page', js: true do
- it 'shows a help message' do
- visit edit_namespace_project_service_path(project.namespace, project, service)
+ scenario 'user visits the slack slash command config page and shows a help message', js: true do
+ visit edit_namespace_project_service_path(project.namespace, project, service)
- wait_for_ajax
+ wait_for_ajax
- expect(page).to have_content('This service allows GitLab users to perform common')
- end
+ expect(page).to have_content('This service allows GitLab users to perform common')
end
- scenario 'saving a token' do
- given(:token) { ('a'..'z').to_a.join }
+ scenario 'shows the token after saving' do
+ visit edit_namespace_project_service_path(project.namespace, project, service)
- it 'shows the token after saving' do
- visit edit_namespace_project_service_path(project.namespace, project, service)
+ fill_in 'service_token', with: 'token'
+ click_on 'Save'
- fill_in 'service_token', with: token
- click_on 'Save'
+ value = find_field('service_token').value
- value = find_field('service_token').value
-
- expect(value).to eq(token)
- end
+ expect(value).to eq('token')
end
- scenario 'the trigger url' do
- it 'shows the correct url' do
- visit edit_namespace_project_service_path(project.namespace, project, service)
+ scenario 'shows the correct trigger url' do
+ visit edit_namespace_project_service_path(project.namespace, project, service)
- value = find_field('url').value
- expect(value).to match("api/v3/projects/#{project.id}/services/slack_slash_commands/trigger")
- end
+ value = find_field('url').value
+ expect(value).to match("api/v3/projects/#{project.id}/services/slack_slash_commands/trigger")
end
end