diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-07 17:14:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-07 17:14:05 -0500 |
commit | ca9d25169dcdd2923a356e2a797d8704506a3787 (patch) | |
tree | 5d94aed1a5f79a5b0abe33d8732fc60e0a4054b3 /tests | |
parent | 9adfa60eb38f6c39ae075e1fa68037375c8789de (diff) | |
parent | bf30090be5e3d339c9188d81a900ed2fe4bd6318 (diff) | |
download | nextcloud-server-ca9d25169dcdd2923a356e2a797d8704506a3787.tar.gz nextcloud-server-ca9d25169dcdd2923a356e2a797d8704506a3787.zip |
Merge pull request #4136 from nextcloud/expire-date-for-all-shares
Unified sharing options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Share20/DefaultShareProviderTest.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index a1e78313558..fce5668440d 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -338,7 +338,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $qb->insert('share') ->values([ 'share_type' => $qb->expr()->literal(\OCP\Share::SHARE_TYPE_LINK), - 'share_with' => $qb->expr()->literal('sharedWith'), + 'password' => $qb->expr()->literal('password'), 'uid_owner' => $qb->expr()->literal('shareOwner'), 'uid_initiator' => $qb->expr()->literal('sharedBy'), 'item_type' => $qb->expr()->literal('file'), @@ -366,7 +366,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->assertEquals($id, $share->getId()); $this->assertEquals(\OCP\Share::SHARE_TYPE_LINK, $share->getShareType()); - $this->assertEquals('sharedWith', $share->getPassword()); + $this->assertNull($share->getSharedWith()); + $this->assertEquals('password', $share->getPassword()); $this->assertEquals('sharedBy', $share->getSharedBy()); $this->assertEquals('shareOwner', $share->getShareOwner()); $this->assertEquals($ownerPath, $share->getNode()); @@ -752,7 +753,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $qb->insert('share') ->values([ 'share_type' => $qb->expr()->literal(\OCP\Share::SHARE_TYPE_LINK), - 'share_with' => $qb->expr()->literal('password'), + 'password' => $qb->expr()->literal('password'), 'uid_owner' => $qb->expr()->literal('shareOwner'), 'uid_initiator' => $qb->expr()->literal('sharedBy'), 'item_type' => $qb->expr()->literal('file'), @@ -814,7 +815,7 @@ class DefaultShareProviderTest extends \Test\TestCase { ['home::shareOwner', 'files/test.txt', 'files/test2.txt'], // regular file on external storage ['smb::whatever', 'files/test.txt', 'files/test2.txt'], - // regular file on external storage in trashbin-like folder, + // regular file on external storage in trashbin-like folder, ['smb::whatever', 'files_trashbin/files/test.txt', 'files_trashbin/files/test2.txt'], ]; } @@ -2353,9 +2354,11 @@ class DefaultShareProviderTest extends \Test\TestCase { $rootFolder ); - $u1 = $userManager->createUser('testShare1', 'test'); - $u2 = $userManager->createUser('testShare2', 'test'); - $u3 = $userManager->createUser('testShare3', 'test'); + $password = md5(time()); + + $u1 = $userManager->createUser('testShare1', $password); + $u2 = $userManager->createUser('testShare2', $password); + $u3 = $userManager->createUser('testShare3', $password); $g1 = $groupManager->createGroup('group1'); |