mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
pass actual redirect when no state (#3285)
This commit is contained in:
committed by
Denys Vuika
parent
4fbacf4860
commit
f63614e964
@@ -101,4 +101,17 @@ describe('AuthGuardService', () => {
|
||||
});
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/fakeLoginRoute']);
|
||||
}));
|
||||
|
||||
it('should pass actual redirect when no state segments exists', async(() => {
|
||||
state.url = '/';
|
||||
|
||||
spyOn(router, 'navigate');
|
||||
spyOn(authService, 'setRedirect');
|
||||
|
||||
service.canActivate(null, state);
|
||||
|
||||
expect(authService.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'ALL', navigation: ['/']
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
Reference in New Issue
Block a user