From 332ea778651386671e7b096769c42a00b69cc32d Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 5 Feb 2015 14:00:05 +0100 Subject: only create a db entry for the user in case of a name conflict on group share --- tests/lib/share/share.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/lib/share') 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; -- cgit v1.2.3