74612: Remove 401 pages and add login redirect to feature-authorization guards

This commit is contained in:
Kristof De Langhe
2020-12-03 14:38:27 +01:00
parent 4145f829a7
commit 411e2bd746
19 changed files with 73 additions and 97 deletions

View File

@@ -226,13 +226,6 @@ describe('Core Module - RxJS Operators', () => {
expect(router.navigateByUrl).toHaveBeenCalledWith('/403', { skipLocationChange: true });
});
it('should call navigateByUrl to a 401 page, when the remote data contains a 401 error', () => {
const testRD = createFailedRemoteDataObject(undefined, new RemoteDataError(401, 'Unauthorized', 'The current user is unauthorized'));
observableOf(testRD).pipe(redirectOn4xx(router, authService)).subscribe();
expect(router.navigateByUrl).toHaveBeenCalledWith('/401', { skipLocationChange: true });
});
it('should not call navigateByUrl to a 404, 403 or 401 page, when the remote data contains another error than a 404, 403 or 401', () => {
const testRD = createFailedRemoteDataObject(undefined, new RemoteDataError(500, 'Server Error', 'Something went wrong'));