diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js index c032b2ad63a1..8ac39f02bd4c 100644 --- a/test/ngResource/resourceSpec.js +++ b/test/ngResource/resourceSpec.js @@ -1444,17 +1444,14 @@ describe('cancelling requests', function() { var creditCard = CreditCard.get(); expect(creditCard.$cancelRequest).toBeDefined(); + expect(httpSpy.calls[0].args[0].timeout).toEqual(jasmine.any($q)); expect(httpSpy.calls[0].args[0].timeout.then).toBeDefined(); - // $httpBackend.flush(); - - // expect(httpSpy).toHaveBeenCalledOnce(); - // expect(httpSpy.calls[0].args[0].timeout).toBe(jasmine.any()); - // expect($log.debug).toHaveBeenCalledOnceWith('ngResource:\n' + - // ' Only numeric values are allowed as `timeout`.\n' + - // ' Promises are not supported in $resource, because the same value has to ' + - // 'be re-used for multiple requests. If you are looking for a way to cancel ' + - // 'requests, you should use the `cancellable` option.'); + expect($log.debug).toHaveBeenCalledOnceWith('ngResource:\n' + + ' Only numeric values are allowed as `timeout`.\n' + + ' Promises are not supported in $resource, because the same value would ' + + 'be used for multiple requests. If you are looking for a way to cancel ' + + 'requests, you should use the `cancellable` option.'); }) );