diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-12-01 15:50:29 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 12:29:25 +0100 |
commit | 3285becdc16a9eb57a507e6ad58100d392f2894a (patch) | |
tree | 1c8800777638c6800f2acb8f33beeec0ecaa4dad /tests/lib/Settings/Admin | |
parent | ebb15283a60d1c2ee5fb731feca1c68275d58264 (diff) | |
download | nextcloud-server-3285becdc16a9eb57a507e6ad58100d392f2894a.tar.gz nextcloud-server-3285becdc16a9eb57a507e6ad58100d392f2894a.zip |
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'tests/lib/Settings/Admin')
-rw-r--r-- | tests/lib/Settings/Admin/SharingTest.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/lib/Settings/Admin/SharingTest.php b/tests/lib/Settings/Admin/SharingTest.php index ee60979b96d..79065fb8d21 100644 --- a/tests/lib/Settings/Admin/SharingTest.php +++ b/tests/lib/Settings/Admin/SharingTest.php @@ -25,6 +25,7 @@ namespace Test\Settings\Admin; use OC\Settings\Admin\Sharing; use OCP\AppFramework\Http\TemplateResponse; +use OCP\Constants; use OCP\IConfig; use OCP\IL10N; use Test\TestCase; @@ -114,6 +115,11 @@ class SharingTest extends TestCase { ->method('getAppValue') ->with('core', 'shareapi_enable_link_password_by_default', 'no') ->willReturn('yes'); + $this->config + ->expects($this->at(13)) + ->method('getAppValue') + ->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL) + ->willReturn(Constants::PERMISSION_ALL); $expected = new TemplateResponse( 'settings', @@ -133,7 +139,9 @@ class SharingTest extends TestCase { 'shareExcludeGroups' => false, 'shareExcludedGroupsList' => '', 'publicShareDisclaimerText' => 'Lorem ipsum', - 'enableLinkPasswordByDefault' => 'yes' + 'enableLinkPasswordByDefault' => 'yes', + 'shareApiDefaultPermissions' => Constants::PERMISSION_ALL, + 'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', []) ], '' ); @@ -207,6 +215,12 @@ class SharingTest extends TestCase { ->method('getAppValue') ->with('core', 'shareapi_enable_link_password_by_default', 'no') ->willReturn('yes'); + $this->config + ->expects($this->at(13)) + ->method('getAppValue') + ->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL) + ->willReturn(Constants::PERMISSION_ALL); + $expected = new TemplateResponse( 'settings', @@ -226,7 +240,9 @@ class SharingTest extends TestCase { 'shareExcludeGroups' => true, 'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers', 'publicShareDisclaimerText' => 'Lorem ipsum', - 'enableLinkPasswordByDefault' => 'yes' + 'enableLinkPasswordByDefault' => 'yes', + 'shareApiDefaultPermissions' => Constants::PERMISSION_ALL, + 'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', []) ], '' ); |