aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/xhr.errorSpec.js
diff options
context:
space:
mode:
authorKarl Seamon2011-07-22 15:56:45 -0400
committerIgor Minar2011-07-27 15:21:31 -0700
commitb5594a773a6f07dcba914aa385f92d3305285b24 (patch)
tree40823e64e9f74b356a8065edae9bbdf351082164 /test/service/xhr.errorSpec.js
parentf39420e7d7aca2a97eaa01853991facf65dcbd6e (diff)
downloadangular.js-b5594a773a6f07dcba914aa385f92d3305285b24.tar.bz2
feat($xhr): add custom error callback to $xhr, $xhr.cache, $xhr.bulk, $resource
Closes #408
Diffstat (limited to 'test/service/xhr.errorSpec.js')
-rw-r--r--test/service/xhr.errorSpec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/service/xhr.errorSpec.js b/test/service/xhr.errorSpec.js
index fdca93ec..d3af4565 100644
--- a/test/service/xhr.errorSpec.js
+++ b/test/service/xhr.errorSpec.js
@@ -29,10 +29,10 @@ describe('$xhr.error', function() {
$browserXhr.expectPOST('/req', 'MyData').respond(500, 'MyError');
$xhr('POST', '/req', 'MyData', callback);
$browserXhr.flush();
- var cb = $xhrError.mostRecentCall.args[0].callback;
+ var cb = $xhrError.mostRecentCall.args[0].success;
expect(typeof cb).toEqual($function);
expect($xhrError).toHaveBeenCalledWith(
- {url:'/req', method:'POST', data:'MyData', callback:cb},
- {status:500, body:'MyError'});
+ {url: '/req', method: 'POST', data: 'MyData', success: cb},
+ {status: 500, body: 'MyError'});
});
});