summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-03-24 20:26:52 +0100
committerGitHub <noreply@github.com>2020-03-24 20:26:52 +0100
commit3b26bfe879e7ebd3eeef1ef767cbacc8acd20293 (patch)
tree01711f01b31ea08d01372c4ef7dba97ef1623f60 /tests
parent3e338c907533dd77599b576ecfadd44b3d1a9855 (diff)
parent9935c71ec310b45a7cfcf0bad286eace4192ebb4 (diff)
downloadnextcloud-server-3b26bfe879e7ebd3eeef1ef767cbacc8acd20293.tar.gz
nextcloud-server-3b26bfe879e7ebd3eeef1ef767cbacc8acd20293.zip
Merge pull request #20127 from nextcloud/bugfix/noid/check-user-on-remote-wipe
Check the user on remote wipe
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/Token/RemoteWipeTest.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/lib/Authentication/Token/RemoteWipeTest.php b/tests/lib/Authentication/Token/RemoteWipeTest.php
index 2ca49d36159..2d887a0a870 100644
--- a/tests/lib/Authentication/Token/RemoteWipeTest.php
+++ b/tests/lib/Authentication/Token/RemoteWipeTest.php
@@ -67,30 +67,20 @@ class RemoteWipeTest extends TestCase {
public function testMarkNonWipableTokenForWipe(): void {
$token = $this->createMock(IToken::class);
- $this->tokenProvider->expects($this->once())
- ->method('getTokenById')
- ->with(123)
- ->willReturn($token);
-
- $result = $this->remoteWipe->markTokenForWipe(123);
-
+ $result = $this->remoteWipe->markTokenForWipe($token);
$this->assertFalse($result);
}
public function testMarkTokenForWipe(): void {
$token = $this->createMock(IWipeableToken::class);
- $this->tokenProvider->expects($this->once())
- ->method('getTokenById')
- ->with(123)
- ->willReturn($token);
$token->expects($this->once())
->method('wipe');
+
$this->tokenProvider->expects($this->once())
->method('updateToken')
->with($token);
- $result = $this->remoteWipe->markTokenForWipe(123);
-
+ $result = $this->remoteWipe->markTokenForWipe($token);
$this->assertTrue($result);
}