From 0c6f357040350390191b975c864064b027ec1026 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 22 Aug 2023 18:07:27 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/lib/gitlab/email/handler/create_note_handler_spec.rb | 4 ++-- spec/lib/gitlab/email/handler/service_desk_handler_spec.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/lib/gitlab/email') 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 -- cgit v1.2.3