diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-10-09 17:16:59 -0400 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-10-12 21:05:00 +0200 |
commit | 0966f1358bf7efd0966cb4ab1eee9cd6c527a384 (patch) | |
tree | d39c8554cb32e28e4ba2c7355508773bdd5a608e | |
parent | a0ac64cbd6f72fc0420b6b3de11ae53ebb3b9783 (diff) | |
download | nextcloud-server-0966f1358bf7efd0966cb4ab1eee9cd6c527a384.tar.gz nextcloud-server-0966f1358bf7efd0966cb4ab1eee9cd6c527a384.zip |
Manually change appconfig value for share policy so tests work correctly
-rw-r--r-- | tests/lib/share/share.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index b2fecdc8bf7..f0b5f120584 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -264,6 +264,8 @@ class Test_Share extends UnitTestCase { } catch (Exception $exception) { $this->assertEqual($exception->getMessage(), $message); } + $policy = OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'); + OC_Appconfig::setValue('core', 'shareapi_share_policy', 'groups_only'); $message = 'Sharing test.txt failed, because '.$this->user1.' is not a member of the group '.$this->group2; try { OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group2, OCP\Share::PERMISSION_READ); @@ -271,6 +273,7 @@ class Test_Share extends UnitTestCase { } catch (Exception $exception) { $this->assertEqual($exception->getMessage(), $message); } + OC_Appconfig::setValue('core', 'shareapi_share_policy', $policy); // Valid share $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\Share::PERMISSION_READ)); |