Skip to content

Commit

Permalink
ShareByMailProviderTest: testGetAccessList: use correct array key
Browse files Browse the repository at this point in the history
Change array key from public to mail.

Signed-off-by: Adam Serbinski <[email protected]>
  • Loading branch information
ASerbinski committed Jan 24, 2023
1 parent dc4c173 commit 9a567fe
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions apps/sharebymail/tests/ShareByMailProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1086,11 +1086,11 @@ public function testGetAccessList() {
$folder = $rootFolder->getUserFolder($u1->getUID())->newFolder('foo');

$accessList = $provider->getAccessList([$folder], true);
$this->assertArrayHasKey('public', $accessList);
$this->assertFalse($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertFalse($accessList['mail']);
$accessList = $provider->getAccessList([$folder], false);
$this->assertArrayHasKey('public', $accessList);
$this->assertFalse($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertFalse($accessList['mail']);

$share1 = $this->shareManager->newShare();
$share1->setSharedWith('[email protected]')
Expand All @@ -1109,29 +1109,29 @@ public function testGetAccessList() {
$share2 = $provider->create($share2);

$accessList = $provider->getAccessList([$folder], true);
$this->assertArrayHasKey('public', $accessList);
$this->assertTrue($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertTrue($accessList['mail']);
$accessList = $provider->getAccessList([$folder], false);
$this->assertArrayHasKey('public', $accessList);
$this->assertTrue($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertTrue($accessList['mail']);

$provider->delete($share2);

$accessList = $provider->getAccessList([$folder], true);
$this->assertArrayHasKey('public', $accessList);
$this->assertTrue($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertTrue($accessList['mail']);
$accessList = $provider->getAccessList([$folder], false);
$this->assertArrayHasKey('public', $accessList);
$this->assertTrue($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertTrue($accessList['mail']);

$provider->delete($share1);

$accessList = $provider->getAccessList([$folder], true);
$this->assertArrayHasKey('public', $accessList);
$this->assertFalse($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertFalse($accessList['mail']);
$accessList = $provider->getAccessList([$folder], false);
$this->assertArrayHasKey('public', $accessList);
$this->assertFalse($accessList['public']);
$this->assertArrayHasKey('mail', $accessList);
$this->assertFalse($accessList['mail']);

$u1->delete();
$u2->delete();
Expand Down

0 comments on commit 9a567fe

Please sign in to comment.