aboutsummaryrefslogtreecommitdiffstats
path: root/test/servicesSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-05-10 10:36:06 -0700
committerMisko Hevery2010-05-10 10:36:06 -0700
commitf5027cc375cf29d8a78679297d9f6bdca9567eb7 (patch)
treef415af2b615656562c1d1ac10fe9b4aab83b54c7 /test/servicesSpec.js
parent4542716370ac52f385795f509436104a2a3501d2 (diff)
parent664f1c56876f00b885272c39f759641271eef1dc (diff)
downloadangular.js-f5027cc375cf29d8a78679297d9f6bdca9567eb7.tar.bz2
Merge branch 'master' of github.com:angular/angular.js
Diffstat (limited to 'test/servicesSpec.js')
-rw-r--r--test/servicesSpec.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js
index 7b17e150..de2d2b2b 100644
--- a/test/servicesSpec.js
+++ b/test/servicesSpec.js
@@ -149,6 +149,7 @@ describe("service", function(){
expect(scope.$route.current).toEqual(null);
scope.$route.when('/NONE', {template:'instant update'});
+ scope.$eval();
expect(scope.$route.current.template).toEqual('instant update');
});
});
@@ -187,7 +188,7 @@ describe("service", function(){
describe('bulk', function(){
it('should collect requests', function(){
- scope.$xhr.bulk.url = "/";
+ scope.$xhr.bulk.urls["/"] = {match:/.*/};
scope.$xhr.bulk('GET', '/req1', null, callback);
scope.$xhr.bulk('POST', '/req2', {post:'data'}, callback);
@@ -225,7 +226,11 @@ describe("service", function(){
});
it('should keep track of in flight requests and request only once', function(){
- cache.delegate = scope.$xhr.bulk;
+ scope.$xhr.bulk.urls['/bulk'] = {
+ match:function(url){
+ return url == '/url';
+ }
+ };
xhr.expectPOST('/bulk', {
requests:[{method:'GET', url:'/url', data: null}]
}).respond([