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

Commit a88473d

Browse files
gkalpakpetebacondarwin
authored andcommitted
test($resource): clean up commented out code
Closes #13891 Closes #13895
1 parent 68f528a commit a88473d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

test/ngResource/resourceSpec.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -1444,17 +1444,14 @@ describe('cancelling requests', function() {
14441444

14451445
var creditCard = CreditCard.get();
14461446
expect(creditCard.$cancelRequest).toBeDefined();
1447+
expect(httpSpy.calls[0].args[0].timeout).toEqual(jasmine.any($q));
14471448
expect(httpSpy.calls[0].args[0].timeout.then).toBeDefined();
14481449

1449-
// $httpBackend.flush();
1450-
1451-
// expect(httpSpy).toHaveBeenCalledOnce();
1452-
// expect(httpSpy.calls[0].args[0].timeout).toBe(jasmine.any());
1453-
// expect($log.debug).toHaveBeenCalledOnceWith('ngResource:\n' +
1454-
// ' Only numeric values are allowed as `timeout`.\n' +
1455-
// ' Promises are not supported in $resource, because the same value has to ' +
1456-
// 'be re-used for multiple requests. If you are looking for a way to cancel ' +
1457-
// 'requests, you should use the `cancellable` option.');
1450+
expect($log.debug).toHaveBeenCalledOnceWith('ngResource:\n' +
1451+
' Only numeric values are allowed as `timeout`.\n' +
1452+
' Promises are not supported in $resource, because the same value would ' +
1453+
'be used for multiple requests. If you are looking for a way to cancel ' +
1454+
'requests, you should use the `cancellable` option.');
14581455
})
14591456
);
14601457

0 commit comments

Comments
 (0)