aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-16 08:52:46 +0100
committerJoas Schilling <coding@schilljs.com>2020-03-16 09:29:28 +0100
commit9935c71ec310b45a7cfcf0bad286eace4192ebb4 (patch)
treeb40257e93a8d559053c096378515c1594ffe5632 /tests/lib
parentf85747f74c54c0bc973e0cd6338239dccf32a3f5 (diff)
downloadnextcloud-server-9935c71ec310b45a7cfcf0bad286eace4192ebb4.tar.gz
nextcloud-server-9935c71ec310b45a7cfcf0bad286eace4192ebb4.zip
Check the user on remote wipe
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib')
-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);
}