aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVojta Jina2011-10-26 21:16:01 -0700
committerIgor Minar2011-11-30 11:17:22 -0500
commit972c3e9be0a7dc90097a0bf55c2d11a4f65ae991 (patch)
treef31e153e6b72490bf36b92e42a6996a542ef9e10 /test
parentfeacf608eefa8cc64845a643f7270c9c3a16d1b8 (diff)
downloadangular.js-972c3e9be0a7dc90097a0bf55c2d11a4f65ae991.tar.bz2
refactor($http): change callback matching mechanism
Diffstat (limited to 'test')
-rw-r--r--test/service/httpSpec.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/test/service/httpSpec.js b/test/service/httpSpec.js
index b39ac3d7..11165adc 100644
--- a/test/service/httpSpec.js
+++ b/test/service/httpSpec.js
@@ -486,7 +486,7 @@ describe('$http', function() {
$httpBackend.flush();
if (match) expect(callback).toHaveBeenCalledOnce();
- else expect(callback).not.toHaveBeenCalledOnce();
+ else expect(callback).not.toHaveBeenCalled();
}
beforeEach(function() {
@@ -620,11 +620,6 @@ describe('$http', function() {
});
- it('should call "xxx" when 0 status code', function() {
- expectToMatch(0, 'xxx');
- });
-
-
it('should not call "2xx" when 0 status code', function() {
expectToNotMatch(0, '2xx');
});
@@ -634,9 +629,9 @@ describe('$http', function() {
expect(status).toBe(0);
});
- $http({method: 'GET', url: '/0'}).on('xxx', callback);
- $http({method: 'GET', url: '/-1'}).on('xxx', callback);
- $http({method: 'GET', url: '/-2'}).on('xxx', callback);
+ $http({method: 'GET', url: '/0'}).on('always', callback);
+ $http({method: 'GET', url: '/-1'}).on('always', callback);
+ $http({method: 'GET', url: '/-2'}).on('always', callback);
$httpBackend.flush();
expect(callback).toHaveBeenCalled();