diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-04 13:49:21 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-04 13:49:21 +0100 |
commit | d247a5fb47a6416dbbd2744938aadfb0045abef8 (patch) | |
tree | 68645c7bc3226be2dfbc0376d846779e7d8c9c47 /apps/sharebymail/tests | |
parent | 3bbacb2f541a513f47e0744ab8a629b936a091d8 (diff) | |
download | nextcloud-server-d247a5fb47a6416dbbd2744938aadfb0045abef8.tar.gz nextcloud-server-d247a5fb47a6416dbbd2744938aadfb0045abef8.zip |
Sharebymail: set expiration on creation
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/sharebymail/tests')
-rw-r--r-- | apps/sharebymail/tests/ShareByMailProviderTest.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 61ad8ae3fd2..fede0d225a2 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -524,6 +524,7 @@ class ShareByMailProviderTest extends TestCase { $password = 'password'; $sendPasswordByTalk = true; $hideDownload = true; + $expiration = new \DateTime(); $instance = $this->getInstance(); @@ -540,7 +541,8 @@ class ShareByMailProviderTest extends TestCase { $token, $password, $sendPasswordByTalk, - $hideDownload + $hideDownload, + $expiration ] ); @@ -565,6 +567,7 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame($password, $result[0]['password']); $this->assertSame($sendPasswordByTalk, (bool)$result[0]['password_by_talk']); $this->assertSame($hideDownload, (bool)$result[0]['hide_download']); + $this->assertSame($expiration->getTimestamp(), \DateTime::createFromFormat('Y-m-d H:i:s', $result[0]['expiration'])->getTimestamp()); } public function testUpdate() { |