diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 14:19:10 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 14:20:59 +0200 |
commit | b10dcfc3b7e84c97d4dba4f7c63b4dff2fbc310b (patch) | |
tree | 05929798758ba15073d40fbfd445f46ea8498987 /apps/dav/tests/unit | |
parent | d7eb17bdc023c6e31d24a0636e0f5cad58aa876f (diff) | |
download | nextcloud-server-b10dcfc3b7e84c97d4dba4f7c63b4dff2fbc310b.tar.gz nextcloud-server-b10dcfc3b7e84c97d4dba4f7c63b4dff2fbc310b.zip |
Fixing local event delivery for calendar events based on the email address
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r-- | apps/dav/tests/unit/connector/sabre/principal.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/principal.php b/apps/dav/tests/unit/connector/sabre/principal.php index 1747885240a..75076e9618b 100644 --- a/apps/dav/tests/unit/connector/sabre/principal.php +++ b/apps/dav/tests/unit/connector/sabre/principal.php @@ -255,4 +255,19 @@ class Principal extends TestCase { public function testSearchPrincipals() { $this->assertSame([], $this->connector->searchPrincipals('principals/users', [])); } + + public function testFindByUri() { + $fooUser = $this->getMockBuilder('\OC\User\User') + ->disableOriginalConstructor()->getMock(); + $fooUser + ->expects($this->exactly(1)) + ->method('getUID') + ->will($this->returnValue('foo')); + + $this->userManager->expects($this->once())->method('getByEmail')->willReturn([ + $fooUser + ]); + $ret = $this->connector->findByUri('mailto:foo@bar.net', 'principals/users'); + $this->assertSame('principals/users/foo', $ret); + } } |