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:
authorRémy Coutable <remy@rymai.me>2017-11-07 14:35:26 +0300
committerRémy Coutable <remy@rymai.me>2017-11-07 14:35:26 +0300
commit4338823416791c6039ce89069a1a91fd84f042b5 (patch)
tree45634eb4fa7d8a61ca50be07e2ec45b5bdc907f4 /spec/models/project_services
parent8138d58d42cb128995b1f9d9ceab7f773c3300e3 (diff)
parent5e7d68ef798c110204351ec089acd896271c4315 (diff)
Merge branch '39791-when-reopening-an-issue-the-mattermost-notification-has-no-context-to-the-issue' into 'master'
Resolve "When reopening an issue the Mattermost Notification has no context to the issue" Closes #39791 See merge request gitlab-org/gitlab-ce!15218
Diffstat (limited to 'spec/models/project_services')
-rw-r--r--spec/models/project_services/chat_message/issue_message_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/project_services/chat_message/issue_message_spec.rb b/spec/models/project_services/chat_message/issue_message_spec.rb
index d37726dc3f1..f7a35fdc88a 100644
--- a/spec/models/project_services/chat_message/issue_message_spec.rb
+++ b/spec/models/project_services/chat_message/issue_message_spec.rb
@@ -66,6 +66,19 @@ describe ChatMessage::IssueMessage do
expect(subject.attachments).to be_empty
end
end
+
+ context 'reopen' do
+ before do
+ args[:object_attributes][:action] = 'reopen'
+ args[:object_attributes][:state] = 'opened'
+ end
+
+ it 'returns a message regarding reopening of issues' do
+ expect(subject.pretext)
+ .to eq('[<http://somewhere.com|project_name>] Issue <http://url.com|#100 Issue title> opened by Test User (test.user)')
+ expect(subject.attachments).to be_empty
+ end
+ end
end
context 'with markdown' do