mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3181] Auth Guard - redirect by string url (#3474)
* redirect by string url * auth guard tests fix * revise
This commit is contained in:
committed by
Eugenio Romano
parent
0cf2a35983
commit
c0de0d5087
@@ -70,7 +70,7 @@ describe('AuthGuardService', () => {
|
||||
service.canActivate(null, state);
|
||||
|
||||
expect(authService.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'ALL', navigation: ['some-url', {}]
|
||||
provider: 'ALL', url: 'some-url'
|
||||
});
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/login']);
|
||||
}));
|
||||
@@ -85,7 +85,7 @@ describe('AuthGuardService', () => {
|
||||
service.canActivate(null, state);
|
||||
|
||||
expect(authService.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'ALL', navigation: ['some-url', { q: 'query' } ]
|
||||
provider: 'ALL', url: 'some-url;q=query'
|
||||
});
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/login']);
|
||||
}));
|
||||
@@ -100,7 +100,7 @@ describe('AuthGuardService', () => {
|
||||
service.canActivate(null, state);
|
||||
|
||||
expect(authService.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'ALL', navigation: ['some-url', {}]
|
||||
provider: 'ALL', url: 'some-url'
|
||||
});
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/fakeLoginRoute']);
|
||||
}));
|
||||
@@ -114,7 +114,7 @@ describe('AuthGuardService', () => {
|
||||
service.canActivate(null, state);
|
||||
|
||||
expect(authService.setRedirect).toHaveBeenCalledWith({
|
||||
provider: 'ALL', navigation: ['/']
|
||||
provider: 'ALL', url: '/'
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
Reference in New Issue
Block a user