diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-16 08:52:46 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-03-16 09:29:28 +0100 |
commit | 9935c71ec310b45a7cfcf0bad286eace4192ebb4 (patch) | |
tree | b40257e93a8d559053c096378515c1594ffe5632 /tests/lib | |
parent | f85747f74c54c0bc973e0cd6338239dccf32a3f5 (diff) | |
download | nextcloud-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.php | 16 |
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); } |