Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Added a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
gotenxds committed Apr 26, 2015
1 parent 21978cd commit cc907a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/router-viewport.es5.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,18 @@ describe('ngViewport', function () {
expect($router.navigating).toBe(false);
});

it('Should allow navigating by component name', function () {
compile('<ng-viewport></ng-viewport>');

$router.config([
{ path: '/', component: 'one' }
]);

$router.navigate('/');
$rootScope.$digest();

expect(elt.text()).toBe('one');
});

function registerComponent(name, template, config) {
if (!template) {
Expand Down

0 comments on commit cc907a3

Please sign in to comment.