diff options
Diffstat (limited to 'test/ResourceSpec.js')
| -rw-r--r-- | test/ResourceSpec.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ResourceSpec.js b/test/ResourceSpec.js index 7987af04..6045bd30 100644 --- a/test/ResourceSpec.js +++ b/test/ResourceSpec.js @@ -261,13 +261,14 @@ describe("resource", function() { errorCB; beforeEach(function() { - errorCB = jasmine.createSpy('error').andCallFake(function(response, status) { - expect(response).toBe(ERROR_RESPONSE); - expect(status).toBe(ERROR_CODE); + errorCB = jasmine.createSpy('error').andCallFake(function(response) { + expect(response.data).toBe(ERROR_RESPONSE); + expect(response.status).toBe(ERROR_CODE); }); }); - it('should call the error callback if provided on non 2xx response', inject(function($httpBackend) { + it('should call the error callback if provided on non 2xx response', + inject(function($httpBackend, $rootScope) { $httpBackend.expect('GET', '/CreditCard/123').respond(ERROR_CODE, ERROR_RESPONSE); CreditCard.get({id:123}, callback, errorCB); |
