diff options
author | Miguel Prokop <miguel.prokop@vtu.com> | 2014-11-21 13:31:56 +0100 |
---|---|---|
committer | Miguel Prokop <miguel.prokop@vtu.com> | 2014-11-21 13:31:56 +0100 |
commit | 397f14ed86ce675b11f35f06ffac30af6c17ade0 (patch) | |
tree | 71c7b809c992a98140babbcdafefc6f5dfb4af6d /tests/lib/share | |
parent | 1d4d308a6c0bb5b13d0dd172cf1eb3622f3e1ee6 (diff) | |
download | nextcloud-server-397f14ed86ce675b11f35f06ffac30af6c17ade0.tar.gz nextcloud-server-397f14ed86ce675b11f35f06ffac30af6c17ade0.zip |
Consolidate if statement, and update unit test
Diffstat (limited to 'tests/lib/share')
-rw-r--r-- | tests/lib/share/helper.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/lib/share/helper.php b/tests/lib/share/helper.php index 76046d360bc..7a546410aea 100644 --- a/tests/lib/share/helper.php +++ b/tests/lib/share/helper.php @@ -27,8 +27,8 @@ class Test_Share_Helper extends \Test\TestCase { array(array('defaultExpireDateSet' => false), 2000000000, 2000010000, 2000010000), // no default expire date and no user defined expire date, return false array(array('defaultExpireDateSet' => false), 2000000000, null, false), - // unenforced expire data and no user defined expire date, take default expire date - array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, null, 2000086400), + // unenforced expire data and no user defined expire date, return false (because the default is not enforced) + array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, null, false), // enforced expire date and no user defined expire date, take default expire date array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true), 2000000000, null, 2000086400), // unenforced expire date and user defined date > default expire date, take users expire date @@ -49,6 +49,4 @@ class Test_Share_Helper extends \Test\TestCase { $result = \OC\Share\Helper::calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate); $this->assertSame($expected, $result); } - - } |