From 102402bfcbad8a0c1730b4d88172bcee28c50df7 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 7 Oct 2020 12:32:16 +0200 Subject: Show unique displayname context in the user share list entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/tests/Controller/ShareAPIControllerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/files_sharing/tests') diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index a2a6ab59809..ff3429ca71c 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -583,6 +583,7 @@ class ShareAPIControllerTest extends TestCase { 'share_type' => IShare::TYPE_USER, 'share_with' => 'userId', 'share_with_displayname' => 'userDisplay', + 'share_with_displayname_unique' => 'userId@example.com', 'uid_owner' => 'initiatorId', 'displayname_owner' => 'initiatorDisplay', 'item_type' => 'file', @@ -782,6 +783,7 @@ class ShareAPIControllerTest extends TestCase { $user = $this->getMockBuilder(IUser::class)->getMock(); $user->method('getUID')->willReturn('userId'); $user->method('getDisplayName')->willReturn('userDisplay'); + $user->method('getEMailAddress')->willReturn('userId@example.com'); $group = $this->getMockBuilder('OCP\IGroup')->getMock(); $group->method('getGID')->willReturn('groupId'); @@ -3440,6 +3442,8 @@ class ShareAPIControllerTest extends TestCase { $initiator->method('getDisplayName')->willReturn('initiatorDN'); $recipient = $this->getMockBuilder(IUser::class)->getMock(); $recipient->method('getDisplayName')->willReturn('recipientDN'); + $recipient->method('getEmailAddress')->willReturn('recipient'); + $result = []; @@ -3479,6 +3483,7 @@ class ShareAPIControllerTest extends TestCase { 'file_target' => 'myTarget', 'share_with' => 'recipient', 'share_with_displayname' => 'recipient', + 'share_with_displayname_unique' => 'recipient', 'note' => 'personal note', 'label' => null, 'mail_send' => 0, @@ -3516,6 +3521,7 @@ class ShareAPIControllerTest extends TestCase { 'file_target' => 'myTarget', 'share_with' => 'recipient', 'share_with_displayname' => 'recipientDN', + 'share_with_displayname_unique' => 'recipient', 'mail_send' => 0, 'mimetype' => 'myMimeType', 'has_preview' => false, @@ -3567,6 +3573,7 @@ class ShareAPIControllerTest extends TestCase { 'file_target' => 'myTarget', 'share_with' => 'recipient', 'share_with_displayname' => 'recipient', + 'share_with_displayname_unique' => 'recipient', 'mail_send' => 0, 'mimetype' => 'myMimeType', 'has_preview' => false, @@ -3614,6 +3621,7 @@ class ShareAPIControllerTest extends TestCase { 'file_target' => 'myTarget', 'share_with' => 'recipient', 'share_with_displayname' => 'recipient', + 'share_with_displayname_unique' => 'recipient', 'mail_send' => 0, 'mimetype' => 'myMimeType', 'has_preview' => false, @@ -4162,6 +4170,7 @@ class ShareAPIControllerTest extends TestCase { 'file_target' => 'myTarget', 'share_with' => 'recipient', 'share_with_displayname' => 'recipient', + 'share_with_displayname_unique' => 'recipient', 'mail_send' => 0, 'mimetype' => 'mimeWithPreview', 'has_preview' => true, -- cgit v1.2.3