Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 16:51:14 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 16:51:14 +0300
commit078f4efb20f269394e5f60fe327ba36c0279d77e (patch)
tree78914467575b8071847e4beb311262857e953e9e /apps/settings/tests
parentd441864cd0505ea213ba5eebef3acc0081704852 (diff)
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/settings/tests')
-rw-r--r--apps/settings/tests/Settings/Admin/SharingTest.php40
1 files changed, 38 insertions, 2 deletions
diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php
index 91b2edf14b1..817d7eae54f 100644
--- a/apps/settings/tests/Settings/Admin/SharingTest.php
+++ b/apps/settings/tests/Settings/Admin/SharingTest.php
@@ -131,6 +131,21 @@ class SharingTest extends TestCase {
->method('getAppValue')
->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL)
->willReturn(Constants::PERMISSION_ALL);
+ $this->config
+ ->expects($this->at(14))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_default_internal_expire_date', 'no')
+ ->willReturn('no');
+ $this->config
+ ->expects($this->at(15))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_internal_expire_after_n_days', '7')
+ ->willReturn('7');
+ $this->config
+ ->expects($this->at(16))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_enforce_internal_expire_date', 'no')
+ ->willReturn('no');
$expected = new TemplateResponse(
'settings',
@@ -152,7 +167,10 @@ class SharingTest extends TestCase {
'publicShareDisclaimerText' => 'Lorem ipsum',
'enableLinkPasswordByDefault' => 'yes',
'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
- 'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', [])
+ 'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', []),
+ 'shareDefaultInternalExpireDateSet' => 'no',
+ 'shareInternalExpireAfterNDays' => '7',
+ 'shareInternalEnforceExpireDate' => 'no',
],
''
);
@@ -231,6 +249,21 @@ class SharingTest extends TestCase {
->method('getAppValue')
->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL)
->willReturn(Constants::PERMISSION_ALL);
+ $this->config
+ ->expects($this->at(14))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_default_internal_expire_date', 'no')
+ ->willReturn('no');
+ $this->config
+ ->expects($this->at(15))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_internal_expire_after_n_days', '7')
+ ->willReturn('7');
+ $this->config
+ ->expects($this->at(16))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_enforce_internal_expire_date', 'no')
+ ->willReturn('no');
$expected = new TemplateResponse(
@@ -253,7 +286,10 @@ class SharingTest extends TestCase {
'publicShareDisclaimerText' => 'Lorem ipsum',
'enableLinkPasswordByDefault' => 'yes',
'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
- 'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', [])
+ 'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', []),
+ 'shareDefaultInternalExpireDateSet' => 'no',
+ 'shareInternalExpireAfterNDays' => '7',
+ 'shareInternalEnforceExpireDate' => 'no',
],
''
);