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 <rullzer@users.noreply.github.com>2019-11-28 10:37:19 +0300
committerGitHub <noreply@github.com>2019-11-28 10:37:19 +0300
commit62dc32019146bdc186e110bde23dd210633acbe7 (patch)
treea4947d148758d953fa5d3777333e8190ab84fb3b /apps/settings/tests
parent669302e570024c83140ff5c4f4b1489c5a1c66ed (diff)
parent078f4efb20f269394e5f60fe327ba36c0279d77e (diff)
Merge pull request #17725 from nextcloud/enh/share_exp_internal
Allow internal shares to have a default expiration date
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 38f687b87ae..ff67ebc28b6 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',
],
''
);