Skip to content
Merged
Show file tree
Hide file tree
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
TTA-145 removing not needed tests
  • Loading branch information
rodolfoIOET committed Aug 26, 2022
commit fe3161b89c50b23e8350aa60a445761eafcfdbf0
23 changes: 0 additions & 23 deletions src/app/modules/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,6 @@ describe('LoginComponent', () => {
expect(featureToggleCookiesService.setCookies).toHaveBeenCalled();
}));

// it('should sign up or login with google if is not logged-in into the app Locally', inject([Router], (router: Router) => {
// spyOn(loginService, 'isLogin').and.returnValue(of(false));
// spyOn(loginService, 'setLocalStorage').and.returnValue();
// spyOn(loginService, 'getUser').and.returnValue(of({token: ''}));
// spyOn(loginService, 'setCookies').and.returnValue();
// spyOn(loginService, 'signIn').and.returnValue();
// spyOn(featureToggleCookiesService, 'setCookies').and.returnValue(featureToggleCookiesService.setCookies());

// component.ngOnInit();
// component.loginWithGoogle();

// expect(loginService.signIn).toHaveBeenCalled();
// expect(loginService.setCookies).toHaveBeenCalled();
// expect(featureToggleCookiesService.setCookies).toHaveBeenCalled();
// }));

it('should not sign-up or login with google if is already logged-in into the app on Production', inject([Router], (router: Router) => {
spyOn(azureAdB2CService, 'isLogin').and.returnValue(true);
spyOn(router, 'navigate').and.stub();
Expand All @@ -124,11 +108,4 @@ describe('LoginComponent', () => {
expect(router.navigate).toHaveBeenCalledWith(['']);
}));

// it('should not sign-up or login with google if is already logged-in into the app Locally', inject([Router], (router: Router) => {
// spyOn(loginService, 'isLogin').and.returnValue(of(true));
// spyOn(router, 'navigate').and.stub();
// component.loginWithGoogle();
// expect(loginService.isLogin).toHaveBeenCalled();
// expect(router.navigate).toHaveBeenCalledWith(['']);
// }));
});
6 changes: 0 additions & 6 deletions src/app/modules/login/services/login.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,11 @@ describe('LoginService', () => {
});
});

// it('should login with social angularx-social-login', () => {
// service.signIn();
// expect(socialAuthService.signIn).toHaveBeenCalled();
// });

it('should logout with social angularx-social-login', () => {
spyOn(cookieService, 'deleteAll').and.returnValue();

service.logout();

// expect(socialAuthService.signOut).toHaveBeenCalled();
expect(localStorage.clear).toHaveBeenCalled();
expect(cookieService.deleteAll).toHaveBeenCalled();
});
Expand Down