aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/routeParamsSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/service/routeParamsSpec.js')
-rw-r--r--test/service/routeParamsSpec.js8
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);
});