mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
pass actual redirect when no state (#3285)
This commit is contained in:
committed by
Denys Vuika
parent
4fbacf4860
commit
f63614e964
@@ -91,6 +91,19 @@ describe('AuthGuardService BPM', () => {
|
||||
expect(authService.getRedirect('BPM')).toEqual(['some-url', { q: '123' }]);
|
||||
}));
|
||||
|
||||
it('should set redirect navigation commands with query params', async(() => {
|
||||
spyOn(authService, 'setRedirect').and.callThrough();
|
||||
spyOn(routerService, 'navigate').and.stub();
|
||||
const router: RouterStateSnapshot = <RouterStateSnapshot> { url: '/' };
|
||||
|
||||
authGuard.canActivate(null, router);
|
||||
|
||||
expect(authService.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'BPM', navigation: ['/']
|
||||
});
|
||||
expect(authService.getRedirect('BPM')).toEqual(['/']);
|
||||
}));
|
||||
|
||||
it('should get redirect url from config if there is one configured', async(() => {
|
||||
appConfigService.config.loginRoute = 'fakeLoginRoute';
|
||||
spyOn(authService, 'setRedirect').and.callThrough();
|
||||
|
Reference in New Issue
Block a user