diff options
| author | Vojta Jina | 2011-07-12 02:18:17 +0200 | 
|---|---|---|
| committer | Vojta Jina | 2011-09-08 23:00:59 +0200 | 
| commit | 22cb600280cecabf719ba1878719c907aa01ba18 (patch) | |
| tree | 3c2247033a6d722e3b4eea0720ab466589ea247e /test/service/routeParamsSpec.js | |
| parent | 5ba227c7cd3ddfcd3bffc3fd15daf8d6ec9b8713 (diff) | |
| download | angular.js-22cb600280cecabf719ba1878719c907aa01ba18.tar.bz2 | |
fix($route): update $route to reflect $location changes
* update $route to reflect new $location
* add some more unit tests to $route
* fix some other failing unit tests
* redirect overrides the url now
Breaks $route custom redirect fn has only 3 params now
Diffstat (limited to 'test/service/routeParamsSpec.js')
| -rw-r--r-- | test/service/routeParamsSpec.js | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/test/service/routeParamsSpec.js b/test/service/routeParamsSpec.js index 58a37f2e..8cdf3af3 100644 --- a/test/service/routeParamsSpec.js +++ b/test/service/routeParamsSpec.js @@ -10,11 +10,11 @@ describe('$routeParams', function(){      $route.when('/foo');      $route.when('/bar/:barId'); -    $location.hash = '/foo?a=b'; +    $location.path('/foo').search('a=b');      scope.$digest();      expect($routeParams).toEqual({a:'b'}); -    $location.hash = '/bar/123?x=abc'; +    $location.path('/bar/123').search('x=abc');      scope.$digest();      expect($routeParams).toEqual({barId:'123', x:'abc'});    }); @@ -30,11 +30,11 @@ describe('$routeParams', function(){      $route.when('/foo');      $route.when('/bar/:barId'); -    $location.hash = '/foo?a=b'; +    $location.path('/foo').search('a=b');      scope.$digest();      expect(scope.$service('$routeParams')).toBe(firstRouteParams); -    $location.hash = '/bar/123?x=abc'; +    $location.path('/bar/123').search('x=abc');      scope.$digest();      expect(scope.$service('$routeParams')).toBe(firstRouteParams);    }); | 
