diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-02-05 14:00:05 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-09 11:16:08 +0200 |
commit | 332ea778651386671e7b096769c42a00b69cc32d (patch) | |
tree | 7668bcdeac5112b4aec394c743ec44785e1e8d72 /tests/lib/share | |
parent | ba52f6f8fc0d88000332e9e64c48a56c526823d9 (diff) | |
download | nextcloud-server-332ea778651386671e7b096769c42a00b69cc32d.tar.gz nextcloud-server-332ea778651386671e7b096769c42a00b69cc32d.zip |
only create a db entry for the user in case of a name conflict on group share
Diffstat (limited to 'tests/lib/share')
-rw-r--r-- | tests/lib/share/share.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 523f7b379a0..124ad450e2e 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -545,6 +545,13 @@ class Test_Share extends \Test\TestCase { // Valid share $this->shareUserOneTestFileWithGroupOne(); + // check if only the group share was created and not a single db-entry for each user + $statement = \OCP\DB::prepare('select `id` from `*PREFIX*share`'); + $query = $statement->execute(); + $result = $query->fetchAll(); + $this->assertSame(1, count($result)); + + // Attempt to share again OC_User::setUserId($this->user1); $message = 'Sharing test.txt failed, because this item is already shared with '.$this->group1; |