This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1444,17 +1444,14 @@ describe('cancelling requests', function() {
1444
1444
1445
1445
var creditCard = CreditCard . get ( ) ;
1446
1446
expect ( creditCard . $cancelRequest ) . toBeDefined ( ) ;
1447
+ expect ( httpSpy . calls [ 0 ] . args [ 0 ] . timeout ) . toEqual ( jasmine . any ( $q ) ) ;
1447
1448
expect ( httpSpy . calls [ 0 ] . args [ 0 ] . timeout . then ) . toBeDefined ( ) ;
1448
1449
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.' ) ;
1458
1455
} )
1459
1456
) ;
1460
1457
You can’t perform that action at this time.
0 commit comments