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-08-22 21:07:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-22 21:07:27 +0300
commit0c6f357040350390191b975c864064b027ec1026 (patch)
treee546c504086b9ca84fbdf297de302a864d976bf1 /spec/lib/gitlab/email
parentb52aefb5996cdd22dc969161d414244a59046e6e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/email')
-rw-r--r--spec/lib/gitlab/email/handler/create_note_handler_spec.rb4
-rw-r--r--spec/lib/gitlab/email/handler/service_desk_handler_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb
index e3b0e90bff9..c7b69f39951 100644
--- a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb
+++ b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb
@@ -68,7 +68,7 @@ RSpec.describe Gitlab::Email::Handler::CreateNoteHandler do
end
context 'when the issue is a Service Desk issue' do
- let(:original_recipient) { User.support_bot }
+ let(:original_recipient) { Users::Internal.support_bot }
it 'does not raise a UserNotFoundError' do
expect { receiver.execute }.not_to raise_error
@@ -209,7 +209,7 @@ RSpec.describe Gitlab::Email::Handler::CreateNoteHandler do
context 'when note is authored from external author for service desk' do
before do
- SentNotification.find_by(reply_key: mail_key).update!(recipient: User.support_bot)
+ SentNotification.find_by(reply_key: mail_key).update!(recipient: Users::Internal.support_bot)
end
context 'when email contains text, quoted text and quick commands' do
diff --git a/spec/lib/gitlab/email/handler/service_desk_handler_spec.rb b/spec/lib/gitlab/email/handler/service_desk_handler_spec.rb
index 98522c53a47..6941ebd2e11 100644
--- a/spec/lib/gitlab/email/handler/service_desk_handler_spec.rb
+++ b/spec/lib/gitlab/email/handler/service_desk_handler_spec.rb
@@ -38,7 +38,7 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler, feature_category: :se
new_issue = Issue.last
- expect(new_issue.author).to eql(User.support_bot)
+ expect(new_issue.author).to eql(Users::Internal.support_bot)
expect(new_issue.confidential?).to be true
expect(new_issue.all_references.all).to be_empty
expect(new_issue.title).to eq("The message subject! @all")
@@ -131,7 +131,7 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler, feature_category: :se
expect(notes.count).to eq(1)
expect(new_note.note).to eq("Service desk reply!\n\n`/label ~label2`")
- expect(new_note.author).to eql(User.support_bot)
+ expect(new_note.author).to eql(Users::Internal.support_bot)
end
it 'does not send thank you email' do
@@ -267,7 +267,7 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler, feature_category: :se
issue = Issue.last
expect(issue.description).to include('Text from service_desk2 template')
expect(issue.label_ids).to include(label.id)
- expect(issue.author_id).to eq(User.support_bot.id)
+ expect(issue.author_id).to eq(Users::Internal.support_bot.id)
expect(issue.milestone).to eq(milestone)
end
end
@@ -294,7 +294,7 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler, feature_category: :se
note = Note.last
expect(note.note).to include("WARNING: The template file unknown.md used for service desk issues is empty or could not be found.")
- expect(note.author).to eq(User.support_bot)
+ expect(note.author).to eq(Users::Internal.support_bot)
end
it 'does not send warning note email' do