From 8afe72e2690e8f00bbb3d6da7869f796fecf19ed Mon Sep 17 00:00:00 2001 From: Bennet Becker Date: Fri, 23 Dec 2022 13:53:20 +0100 Subject: [PATCH] Updating unit test for NewUserMailHelper, to test for autosumbitted header Signed-off-by: Bennet Becker --- apps/settings/tests/Mailer/NewUserMailHelperTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index 252dcfd805763..efb7ca9a29bb5 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -42,6 +42,7 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\L10N\IFactory; +use OCP\Mail\AutoSubmittedValue; use OCP\Mail\IEMailTemplate; use OCP\Mail\IMailer; use OCP\Security\ICrypto; @@ -867,6 +868,10 @@ public function testSendMail() { ->expects($this->once()) ->method('useTemplate') ->with($emailTemplate); + $message + ->expects($this->once()) + ->method('setAutoSubmitted') + ->with(AutoSubmittedValue::AUTO_GENERATED); $this->defaults ->expects($this->once()) ->method('getName')