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
@@ -235,6 +235,28 @@ describe('AuthGuardService ECM', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('with no route state', () => {
|
||||
beforeEach(async(() => {
|
||||
this.test = new TestConfig({
|
||||
isLoggedIn: false
|
||||
});
|
||||
|
||||
const { guard, auth, router } = this.test;
|
||||
|
||||
guard.canActivate(null, { url: '/' }).then((activate) => {
|
||||
this.auth = auth;
|
||||
});
|
||||
|
||||
this.navigateSpy = spyOn(router, 'navigate');
|
||||
}));
|
||||
|
||||
it('should set redirect navigation commands with query params', () => {
|
||||
expect(this.auth.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'ECM', navigation: ['/']
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('canActivateChild', () => {
|
||||
|
Reference in New Issue
Block a user