From cc907a3444610bd20569192dea1454db12269dae Mon Sep 17 00:00:00 2001 From: David limkys Date: Sun, 26 Apr 2015 23:43:33 +0300 Subject: [PATCH] Added a test. --- test/router-viewport.es5.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/router-viewport.es5.spec.js b/test/router-viewport.es5.spec.js index 20044c5..70ef4da 100644 --- a/test/router-viewport.es5.spec.js +++ b/test/router-viewport.es5.spec.js @@ -647,6 +647,18 @@ describe('ngViewport', function () { expect($router.navigating).toBe(false); }); + it('Should allow navigating by component name', function () { + compile(''); + + $router.config([ + { path: '/', component: 'one' } + ]); + + $router.navigate('/'); + $rootScope.$digest(); + + expect(elt.text()).toBe('one'); + }); function registerComponent(name, template, config) { if (!template) {