|
|
@ -21,13 +21,14 @@ describe('MustBeNotAuthenticatedGuard', () => { |
|
|
const uiOptions = new UIOptions({}); |
|
|
const uiOptions = new UIOptions({}); |
|
|
|
|
|
|
|
|
beforeEach(() => { |
|
|
beforeEach(() => { |
|
|
|
|
|
uiOptions.value.redirectToLogin = false; |
|
|
|
|
|
|
|
|
location = Mock.ofType<Location>(); |
|
|
location = Mock.ofType<Location>(); |
|
|
|
|
|
|
|
|
location.setup(x => x.path(true)) |
|
|
location.setup(x => x.path(true)) |
|
|
.returns(() => '/my-path'); |
|
|
.returns(() => '/my-path'); |
|
|
|
|
|
|
|
|
router = Mock.ofType<Router>(); |
|
|
router = Mock.ofType<Router>(); |
|
|
|
|
|
|
|
|
authService = Mock.ofType<AuthService>(); |
|
|
authService = Mock.ofType<AuthService>(); |
|
|
authGuard = new MustBeNotAuthenticatedGuard(authService.object, location.object, router.object, uiOptions); |
|
|
authGuard = new MustBeNotAuthenticatedGuard(authService.object, location.object, router.object, uiOptions); |
|
|
}); |
|
|
}); |
|
|
|