summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-09 23:37:02 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-09 23:37:02 +0200
commit5abbf6d5b0804fe877bd816bd6dbb0dab3466d3d (patch)
treed2d1fc4d8b61ab2ce70c7dff11a53f0243e6032f /tests
parent10ffa3b770f4118133cfd79cca517835cde0ac73 (diff)
parent332ea778651386671e7b096769c42a00b69cc32d (diff)
downloadnextcloud-server-5abbf6d5b0804fe877bd816bd6dbb0dab3466d3d.tar.gz
nextcloud-server-5abbf6d5b0804fe877bd816bd6dbb0dab3466d3d.zip
Merge pull request #13920 from owncloud/sharing_no_user_entry_for_group_shares
only create a db entry for the user in case of a name conflict on group share
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share/share.php7
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;