diff --git a/frontend/app/model/network/autehentication.service.spec.ts b/frontend/app/model/network/autehentication.service.spec.ts index 34d63f14..e984403e 100644 --- a/frontend/app/model/network/autehentication.service.spec.ts +++ b/frontend/app/model/network/autehentication.service.spec.ts @@ -45,8 +45,8 @@ describe('AuthenticationService', () => { it('should have Authenticated use', inject([ AuthenticationService ], (authService) => { spyOn(authService.OnAuthenticated,"trigger").and.callThrough(); authService.login(); - expect(authService.OnAuthenticated.trigger).toHaveBeenCalled(); authService.OnAuthenticated.on(() =>{ + expect(authService.OnAuthenticated.trigger).toHaveBeenCalled(); expect(authService.getUser()).not.toBe(null); expect(authService.isAuthenticated()).toBe(true); }); diff --git a/frontend/app/model/network/user.service.spec.ts b/frontend/app/model/network/user.service.spec.ts index b230cb83..980064ea 100644 --- a/frontend/app/model/network/user.service.spec.ts +++ b/frontend/app/model/network/user.service.spec.ts @@ -35,7 +35,7 @@ describe('UserService', () => { spyOn(networkService,"postJson"); let credential = new LoginCredential("name","pass"); userService.login(credential); - expect(networkService.getJson).toHaveBeenCalled(); + expect(networkService.postJson).toHaveBeenCalled(); expect(networkService.postJson.calls.argsFor(0)).toEqual(["/user/login",{"loginCredential": credential}]); }));