Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

test($resource): clean up commented out code #13895

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions test/ngResource/resourceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
})
);

Expand Down