Revert "fix(router): guards restor an incorrect url when used with skipLocationChange"

This reverts commit ad20d7d260.
This commit is contained in:
Chuck Jazdzewski
2016-11-22 12:15:54 -08:00
parent 909268036b
commit 3e548de99d
2 changed files with 3 additions and 27 deletions

View File

@ -1532,27 +1532,6 @@ describe('Integration', () => {
expect(location.path()).toEqual('/main/component1');
})));
it('should respect skipLocationChange when guards cancel navigations',
fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
const fixture = createRoot(router, RootCmp);
router.resetConfig([
{path: 'component1', component: SimpleCmp},
{path: 'component2', component: SimpleCmp, canDeactivate: ['alwaysFalse']}
]);
router.navigateByUrl('/component1'); // initial state
advance(fixture);
router.navigateByUrl('/component2', {skipLocationChange: true});
advance(fixture);
expect(location.path()).toEqual('/component1');
location.back();
advance(fixture);
expect(location.path()).toEqual('/component1');
})));
});
describe('should work when given a class', () => {