Skip to content

Commit 3845a34

Browse files
come-ncmickenordin
authored andcommitted
chore(tests): Adapt BackupCodeStorageTest to code changes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent b5b78b6 commit 3845a34

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,11 @@ public function testValidateCode(): void {
158158
->with('CHALLENGE', 'HASHEDVALUE', $this->anything())
159159
->willReturn(true);
160160
$this->mapper->expects($this->once())
161-
->method('update')
162-
->with($code);
161+
->method('markUsedIfUnused')
162+
->with($code)
163+
->willReturn(1);
163164

164165
$this->assertTrue($this->storage->validateCode($user, 'CHALLENGE'));
165-
166-
$this->assertEquals(1, $code->getUsed());
167166
}
168167

169168
public function testValidateUsedCode(): void {

0 commit comments

Comments
 (0)