debian-mirror-gitlab/spec/features/projects/services/slack_service_spec.rb

27 lines
1.1 KiB
Ruby
Raw Normal View History

2016-08-24 12:49:21 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
feature 'Projects > Slack service > Setup events' do
2016-08-24 12:49:21 +05:30
let(:user) { create(:user) }
let(:service) { SlackService.new }
let(:project) { create(:project, slack_service: service) }
background do
service.fields
2017-08-17 22:00:37 +05:30
service.update_attributes(push_channel: 1, issue_channel: 2, merge_request_channel: 3, note_channel: 4, tag_push_channel: 5, pipeline_channel: 6, wiki_page_channel: 7)
2016-08-24 12:49:21 +05:30
project.team << [user, :master]
2017-09-10 17:25:29 +05:30
sign_in(user)
2016-08-24 12:49:21 +05:30
end
scenario 'user can filter events by channel' do
2017-09-10 17:25:29 +05:30
visit edit_project_service_path(project, service)
2016-08-24 12:49:21 +05:30
expect(page.find_field("service_push_channel").value).to have_content '1'
expect(page.find_field("service_issue_channel").value).to have_content '2'
expect(page.find_field("service_merge_request_channel").value).to have_content '3'
expect(page.find_field("service_note_channel").value).to have_content '4'
expect(page.find_field("service_tag_push_channel").value).to have_content '5'
2017-08-17 22:00:37 +05:30
expect(page.find_field("service_pipeline_channel").value).to have_content '6'
2016-08-24 12:49:21 +05:30
expect(page.find_field("service_wiki_page_channel").value).to have_content '7'
end
end