diff options
| author | Karl Seamon | 2011-07-22 15:56:45 -0400 | 
|---|---|---|
| committer | Igor Minar | 2011-07-27 15:21:31 -0700 | 
| commit | b5594a773a6f07dcba914aa385f92d3305285b24 (patch) | |
| tree | 40823e64e9f74b356a8065edae9bbdf351082164 /test/service/xhr.errorSpec.js | |
| parent | f39420e7d7aca2a97eaa01853991facf65dcbd6e (diff) | |
| download | angular.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.js | 6 | 
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'});    });  }); | 
