diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-07-28 14:50:40 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-01 10:07:53 +0200 |
commit | 06b9e580814cffdc2567686cd9aac80e7418bc26 (patch) | |
tree | 27ff4d05838b7fe9f5752c0ac16d916fea815013 /apps/federation/tests | |
parent | 51d85eb2f84675f292279fc4d5977c958620e802 (diff) | |
download | nextcloud-server-06b9e580814cffdc2567686cd9aac80e7418bc26.tar.gz nextcloud-server-06b9e580814cffdc2567686cd9aac80e7418bc26.zip |
expire requestSharedSecret job after 30 days
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federation/tests')
-rw-r--r-- | apps/federation/tests/TrustedServersTest.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 598c2f01c90..ee63faa3ba5 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -117,10 +117,11 @@ class TrustedServersTest extends TestCase { $this->dispatcher ] ) - ->setMethods(['normalizeUrl', 'updateProtocol']) + ->setMethods(['normalizeUrl', 'updateProtocol', 'getTimestamp']) ->getMock(); $trustedServers->expects($this->once())->method('updateProtocol') ->with('url')->willReturn('https://url'); + $trustedServers->expects($this->any())->method('getTimestamp')->willReturn(1234567); $this->dbHandler->expects($this->once())->method('addServer')->with('https://url') ->willReturn($success); @@ -130,7 +131,7 @@ class TrustedServersTest extends TestCase { $this->dbHandler->expects($this->once())->method('addToken')->with('https://url', 'token'); $this->jobList->expects($this->once())->method('add') ->with('OCA\Federation\BackgroundJob\RequestSharedSecret', - ['url' => 'https://url', 'token' => 'token']); + ['url' => 'https://url', 'token' => 'token', 'created' => 1234567]); } else { $this->jobList->expects($this->never())->method('add'); } |