Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSujith Haridasan <sujith.h@gmail.com>2020-10-05 13:39:00 +0300
committerSujith Haridasan <sujith.h@gmail.com>2020-10-05 14:17:57 +0300
commit62923a5e1eb5369dd5a89cd7b7928b13a8a61c6a (patch)
tree515704a105457eff38264abfbd6629f415df680c /apps/provisioning_api/tests
parentb186852f9d387ac3517ae62804d5b81f178376c9 (diff)
Fix the user email issue while creating a user
When the user is created, the provisioning api was not adding the email address of the user when provided if the `send email to new user` is not set. Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
Diffstat (limited to 'apps/provisioning_api/tests')
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
index fec7fc9f135..d508670d4f6 100644
--- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
@@ -500,9 +500,13 @@ class UsersControllerTest extends TestCase {
->method('userExists')
->with('NewUser')
->willReturn(false);
+ $newUser = $this->createMock(IUser::class);
+ $newUser->expects($this->once())
+ ->method('setEMailAddress');
$this->userManager
->expects($this->once())
- ->method('createUser');
+ ->method('createUser')
+ ->willReturn($newUser);
$this->logger
->expects($this->once())
->method('info')