We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5feed3d commit 4d5c10fCopy full SHA for 4d5c10f
test/restangularSpec.js
@@ -557,6 +557,20 @@ describe("Restangular", function() {
557
558
$httpBackend.flush();
559
});
560
+
561
+ it("putElement() should pass a restangularCollection to the callback", function() {
562
+ $httpBackend.expectGET('/accounts');
563
+ restangularAccounts.getList().then(function(accounts) {
564
+ expect(accounts.restangularCollection).toBe(true);
565
+ accounts[1].amount += 1;
566
+ $httpBackend.expectPUT('/accounts/1');
567
+ accounts.putElement(1).then(function(newAccounts) {
568
+ expect(newAccounts.restangularCollection).toBe(true);
569
+ expect(newAccounts.putElement).toBeDefined();
570
+ });
571
572
+ $httpBackend.flush();
573
+ })
574
575
576
describe("Scoped Service", function() {
0 commit comments