summaryrefslogtreecommitdiffstats
path: root/apps/federation/tests
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2016-02-15 16:24:21 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2016-02-15 18:03:10 +0100
commitcc397da1bec21d27fbf9ff392958298014630b9c (patch)
tree5d0bc4594bbef5ff8b6c1bd20cdd9af03e642a72 /apps/federation/tests
parent46b39c3465e2db9ba26b23d8d0dfca6cc670aaea (diff)
downloadnextcloud-server-cc397da1bec21d27fbf9ff392958298014630b9c.tar.gz
nextcloud-server-cc397da1bec21d27fbf9ff392958298014630b9c.zip
Remove background job if the server accepted to ask for the shared secret
If we don't remove it the server will later ask the remote server to ask for the shared secret which will result in a error log message on the remote server and in some circumstances maybe even to a failure
Diffstat (limited to 'apps/federation/tests')
-rw-r--r--apps/federation/tests/api/ocsauthapitest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/federation/tests/api/ocsauthapitest.php b/apps/federation/tests/api/ocsauthapitest.php
index 9c751fff895..d3e61c0641a 100644
--- a/apps/federation/tests/api/ocsauthapitest.php
+++ b/apps/federation/tests/api/ocsauthapitest.php
@@ -105,8 +105,11 @@ class OCSAuthAPITest extends TestCase {
if ($expected === Http::STATUS_OK) {
$this->jobList->expects($this->once())->method('add')
->with('OCA\Federation\BackgroundJob\GetSharedSecret', ['url' => $url, 'token' => $token]);
+ $this->jobList->expects($this->once())->method('remove')
+ ->with('OCA\Federation\BackgroundJob\RequestSharedSecret', ['url' => $url, 'token' => $localToken]);
} else {
$this->jobList->expects($this->never())->method('add');
+ $this->jobList->expects($this->never())->method('remove');
}
$result = $this->ocsAuthApi->requestSharedSecret();