diff options
Diffstat (limited to 'test/ng/routeParamsSpec.js')
| -rw-r--r-- | test/ng/routeParamsSpec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ng/routeParamsSpec.js b/test/ng/routeParamsSpec.js index 07c6d4f7..52fe8d2a 100644 --- a/test/ng/routeParamsSpec.js +++ b/test/ng/routeParamsSpec.js @@ -29,4 +29,16 @@ describe('$routeParams', function() { expect($routeParams).toEqual({bar:'barvalue', foo:'foovalue'}); }); }); + + it('should support route params not preceded by slashes', function() { + module(function($routeProvider) { + $routeProvider.when('/bar:barId/foo:fooId/', {}); + }); + + inject(function($rootScope, $route, $location, $routeParams) { + $location.path('/barbarvalue/foofoovalue/'); + $rootScope.$digest(); + expect($routeParams).toEqual({barId: 'barvalue', fooId: 'foovalue'}); + }); + }); }); |
