[Pkg-owncloud-commits] [owncloud] 31/67: Manually change appconfig value for share policy so tests work correctly

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:10:37 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.

commit 0966f1358bf7efd0966cb4ab1eee9cd6c527a384
Author: Michael Gapczynski <mtgap at owncloud.com>
Date:   Tue Oct 9 17:16:59 2012 -0400

    Manually change appconfig value for share policy so tests work correctly
---
 tests/lib/share/share.php |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index b2fecdc..f0b5f12 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));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list