Skip to content

Commit 96418d4

Browse files
author
Guido Quezada
committed
TT-15 fix: setCookies for sing up or login test
1 parent 6022747 commit 96418d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/modules/login/login.component.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ describe('LoginComponent', () => {
1717
},
1818
signIn() {
1919
return of();
20+
},
21+
setCookies() {
2022
}
2123
};
2224

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

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

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

0 commit comments

Comments
 (0)