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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-15 09:10:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-15 09:10:13 +0300
commitb4610c51192adc832d25192038a781d2aa1ebb98 (patch)
tree860bb889ee850e13a1f947489d768801556f9213 /spec/mailers
parenta7b6d465ae75b497ac34cb43361edd0c8ce45fbd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/emails/service_desk_spec.rb21
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/mailers/emails/service_desk_spec.rb b/spec/mailers/emails/service_desk_spec.rb
index f8ed26b3241..22b910b3dae 100644
--- a/spec/mailers/emails/service_desk_spec.rb
+++ b/spec/mailers/emails/service_desk_spec.rb
@@ -298,9 +298,26 @@ RSpec.describe Emails::ServiceDesk, feature_category: :service_desk do
let_it_be(:note) { create(:note_on_issue, noteable: issue, project: project, note: "Hey @all, just a ping", author: User.support_bot) }
let(:template_content) { 'some text %{ NOTE_TEXT }' }
- let(:expected_template_html) { 'Hey , just a ping' }
- it_behaves_like 'a service desk notification email with template content', 'new_note'
+ context 'when `disable_all_mention` is disabled' do
+ let(:expected_template_html) { 'Hey , just a ping' }
+
+ before do
+ stub_feature_flags(disable_all_mention: false)
+ end
+
+ it_behaves_like 'a service desk notification email with template content', 'new_note'
+ end
+
+ context 'when `disable_all_mention` is enabled' do
+ let(:expected_template_html) { 'Hey @all, just a ping' }
+
+ before do
+ stub_feature_flags(disable_all_mention: true)
+ end
+
+ it_behaves_like 'a service desk notification email with template content', 'new_note'
+ end
end
end