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

Commit a31c088

Browse files
author
supasak
committed
test($resource): Delete $cancelRequest from toJSON()
Add test of pull request #15244 (#15244)
1 parent 73a9823 commit a31c088

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/ngResource/resourceSpec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ describe('basic usage', function() {
737737
expect(person2).toEqual(jasmine.any(Person));
738738
});
739739

740-
it('should not include $promise and $resolved when resource is toJson\'ed', function() {
740+
it('should not include $promise, $resolved and $cancelRequest when resource is toJson\'ed', function() {
741741
$httpBackend.expect('GET', '/CreditCard/123').respond({id: 123, number: '9876'});
742742
var cc = CreditCard.get({id: 123});
743743
$httpBackend.flush();
@@ -750,6 +750,7 @@ describe('basic usage', function() {
750750
var json = JSON.parse(angular.toJson(cc));
751751
expect(json.$promise).not.toBeDefined();
752752
expect(json.$resolved).not.toBeDefined();
753+
expect(json.$cancelRequest).not.toBeDefined();
753754
expect(json).toEqual({id: 123, number: '9876', $myProp: 'still here'});
754755
});
755756

0 commit comments

Comments
 (0)