path: 'login-change-password',
component: LoginPasswordFormComponent,
canActivate: [NoSsoGuardService]
- },
- { path: 'logout', children: [] }
+ }
]
},
{
});
request.flush({});
expect(component.onPasswordChange).toHaveBeenCalled();
- expect(router.navigate).toHaveBeenCalledWith(['/logout']);
+ expect(router.navigate).toHaveBeenCalledWith(['/login']);
});
});
*/
onPasswordChange() {
this.notificationService.show(NotificationType.success, this.i18n('Updated user password"'));
- // Theoretically it is not necessary to navigate to '/logout' because
- // the auth token gets invalid after changing the password in the
- // backend, thus the user would be automatically logged out after the
- // next periodically API request is executed.
- this.router.navigate(['/logout']);
+ this.router.navigate(['/login']);
}
}
let service: AuthService;
let httpTesting: HttpTestingController;
- const routes: Routes = [{ path: 'logout', children: [] }];
+ const routes: Routes = [{ path: 'login', children: [] }];
configureTestBed({
providers: [AuthService, AuthStorageService],
logout(callback: Function = null) {
return this.http.post('api/auth/logout', null).subscribe((resp: any) => {
- this.router.navigate(['/logout'], { skipLocationChange: true });
+ this.router.navigate(['/login'], { skipLocationChange: true });
this.authStorageService.remove();
if (callback) {
callback();