Skip to content

Commit

Permalink
update 2fa test
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Sep 4, 2024
1 parent ed4f295 commit 79dfe5e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/materia
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'
import { of } from 'rxjs'
import { TwoFactorSetup } from 'src/app/types/two-factor.endpoint'

describe('TwoFactorEnableComponent', () => {
let component: TwoFactorEnableComponent
Expand All @@ -29,7 +30,7 @@ describe('TwoFactorEnableComponent', () => {
'TwoFactorAuthenticationService',
{
getTextCode: of({ secret: '123456' }),
register: undefined,
register: of({ valid: true } as TwoFactorSetup),
}
)

Expand Down Expand Up @@ -102,5 +103,6 @@ describe('TwoFactorEnableComponent', () => {
fixture.detectChanges()

expect(fakeTwoFactorAuthenticationService.register).toHaveBeenCalled()
expect(component.showBadVerificationCode).toBeFalse()
})
})

0 comments on commit 79dfe5e

Please sign in to comment.