Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TT-15 fix: setCookies for sing up or login test
  • Loading branch information
Guido Quezada committed Dec 9, 2020
commit 8fd812ba70f61e1e7d00485b007767af3d48284f
6 changes: 5 additions & 1 deletion src/app/modules/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ describe('LoginComponent', () => {
},
signIn() {
return of();
},
setCookies() {
}
};

Expand Down Expand Up @@ -51,9 +53,11 @@ describe('LoginComponent', () => {

it('should sign up or login with google if is not logged-in into the app', inject([Router], (router: Router) => {
spyOn(azureAdB2CService, 'isLogin').and.returnValue(false);
spyOn(azureAdB2CService, 'signIn').and.returnValue(of());
spyOn(azureAdB2CService, 'setCookies').and.returnValue();
spyOn(azureAdB2CService, 'signIn').and.returnValue(of(() => {}));
component.login();
expect(azureAdB2CService.signIn).toHaveBeenCalled();
expect(azureAdB2CService.setCookies).toHaveBeenCalled();
}));

it('should not sign-up or login with google if is already logged-in into the app', inject([Router], (router: Router) => {
Expand Down