Fix activity titles for MRs in chat notification services
This commit is contained in:
parent
8c2192943a
commit
49c07a4139
|
@ -26,7 +26,7 @@ module ChatMessage
|
|||
|
||||
def activity
|
||||
{
|
||||
title: "Merge Request #{state} by #{user_combined_name}",
|
||||
title: "Merge Request #{state_or_action_text} by #{user_combined_name}",
|
||||
subtitle: "in #{project_link}",
|
||||
text: merge_request_link,
|
||||
image: user_avatar
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix activity titles for MRs in chat notification services
|
||||
merge_request: 21834
|
||||
author:
|
||||
type: fixed
|
|
@ -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' }
|
||||
|
||||
|
|
Loading…
Reference in New Issue