[ADF-3181] Auth Guard - redirect by string url (#3474)

* redirect by string url

* auth guard tests fix

* revise
This commit is contained in:
Cilibiu Bogdan
2018-06-14 12:19:34 +03:00
committed by Eugenio Romano
parent 0cf2a35983
commit c0de0d5087
12 changed files with 55 additions and 111 deletions

View File

@@ -113,12 +113,12 @@ describe('LoginComponent', () => {
spyOn(authService, 'login').and.returnValue(Observable.of({ type: 'type', ticket: 'ticket' }));
const redirect = '/home';
component.successRoute = redirect;
authService.setRedirect({ provider: 'ECM', navigation: ['some-route'] });
authService.setRedirect({ provider: 'ECM', url: 'some-route' });
spyOn(router, 'navigate');
spyOn(router, 'navigateByUrl');
loginWithCredentials('fake-username', 'fake-password');
expect(router.navigate).toHaveBeenCalledWith(['some-route']);
expect(router.navigateByUrl).toHaveBeenCalledWith('some-route');
});
it('should update user preferences upon login', async(() => {