Skip to content

Commit

Permalink
Adiciona teste no redirecionamento
Browse files Browse the repository at this point in the history
Signed-off-by: DaviMarinho <[email protected]>
  • Loading branch information
DaviMarinho committed Dec 9, 2023
1 parent 9302f65 commit 1898b70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/pages/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ describe('LoginComponent', () => {
expect(component.navigator).toHaveBeenCalledWith('/register');
});

it('should call navigator method when "Login com redes sociais" is clicked', () => {
spyOn(component, 'navigator').and.callThrough();
const loginsocial = fixture.nativeElement.querySelector('.text-blue-brand');
loginsocial.click();

expect(component.navigator).toHaveBeenCalledWith('/login-social');
});

it('should call login and return an error', () => {
fixture.detectChanges();
const form = component.userForm;
Expand Down

0 comments on commit 1898b70

Please sign in to comment.