diff options
author | Nick Thomas <nick@gitlab.com> | 2018-09-20 13:47:08 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-09-20 13:52:14 +0300 |
commit | 49c07a4139701cef14e9f1335c819f618717bf95 (patch) | |
tree | 72776ba5437f76831771b1792c869a3c1b6af285 /spec/models/project_services | |
parent | 8c2192943a5efc4d0a28c67b04bf9b979def66a1 (diff) |
Fix activity titles for MRs in chat notification services
Diffstat (limited to 'spec/models/project_services')
-rw-r--r-- | spec/models/project_services/chat_message/merge_message_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/project_services/chat_message/merge_message_spec.rb b/spec/models/project_services/chat_message/merge_message_spec.rb index 96496295825..7997b5bb6b9 100644 --- a/spec/models/project_services/chat_message/merge_message_spec.rb +++ b/spec/models/project_services/chat_message/merge_message_spec.rb @@ -27,6 +27,23 @@ describe ChatMessage::MergeMessage do } end + # Integration point in EE + context 'when state is overridden' do + it 'respects the overridden state' do + allow(subject).to receive(:state_or_action_text) { 'devoured' } + + aggregate_failures do + expect(subject.summary).not_to include('opened') + expect(subject.summary).to include('devoured') + + activity_title = subject.activity[:title] + + expect(activity_title).not_to include('opened') + expect(activity_title).to include('devoured') + end + end + end + context 'without markdown' do let(:color) { '#345' } |