Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_services/slack_service/issue_message_spec.rb')
-rw-r--r--spec/models/project_services/slack_service/issue_message_spec.rb56
1 files changed, 0 insertions, 56 deletions
diff --git a/spec/models/project_services/slack_service/issue_message_spec.rb b/spec/models/project_services/slack_service/issue_message_spec.rb
deleted file mode 100644
index 8bca1fef44c..00000000000
--- a/spec/models/project_services/slack_service/issue_message_spec.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-require 'spec_helper'
-
-describe SlackService::IssueMessage do
- subject { SlackService::IssueMessage.new(args) }
-
- let(:args) {
- {
- user: {
- name: 'Test User',
- username: 'Test User'
- },
- project_name: 'project_name',
- project_url: 'somewhere.com',
-
- object_attributes: {
- title: 'Issue title',
- id: 10,
- iid: 100,
- assignee_id: 1,
- url: 'url',
- action: 'open',
- state: 'opened',
- description: 'issue description'
- }
- }
- }
-
- let(:color) { '#345' }
-
- context 'open' do
- it 'returns a message regarding opening of issues' do
- expect(subject.pretext).to eq(
- 'Test User opened <url|issue #100> in <somewhere.com|project_name>: '\
- '*Issue title*')
- expect(subject.attachments).to eq([
- {
- text: "issue description",
- color: color,
- }
- ])
- end
- end
-
- context 'close' do
- before do
- args[:object_attributes][:action] = 'close'
- args[:object_attributes][:state] = 'closed'
- end
- it 'returns a message regarding closing of issues' do
- expect(subject.pretext). to eq(
- 'Test User closed <url|issue #100> in <somewhere.com|project_name>: '\
- '*Issue title*')
- expect(subject.attachments).to be_empty
- end
- end
-end