From b5594a773a6f07dcba914aa385f92d3305285b24 Mon Sep 17 00:00:00 2001 From: Karl Seamon Date: Fri, 22 Jul 2011 15:56:45 -0400 Subject: feat($xhr): add custom error callback to $xhr, $xhr.cache, $xhr.bulk, $resource Closes #408 --- test/service/xhr.errorSpec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/service/xhr.errorSpec.js') 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'}); }); }); -- cgit v1.2.3