Skip to content

Commit 8a15bef

Browse files
committed
fixed some stuff
1 parent e038b1e commit 8a15bef

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

ClearBlade.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ if (!window.console) {
10531053
if (err) {
10541054
callback(err, data);
10551055
} else {
1056-
self.data = data[0].data;
1056+
self.data = data[0];
10571057
callback(err, data);
10581058
}
10591059
};
@@ -1069,7 +1069,7 @@ if (!window.console) {
10691069
if (err) {
10701070
callback(err, data);
10711071
} else {
1072-
self.data = data[0].data;
1072+
self.data = data[0];
10731073
callback(err, data);
10741074
}
10751075
};

test/ClearBladeSpec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ describe("ClearBlade collection fetching with users", function () {
226226
}, "returnedData should not be undefined", TEST_TIMEOUT);
227227

228228
runs(function () {
229-
expect(returnedData.DATA[0].name).toEqual('aaron');
229+
expect(returnedData[0].data.name).toEqual('aaron');
230230
});
231231
});
232232
});
@@ -290,7 +290,7 @@ describe("ClearBlade Query usage with anonymous user", function() {
290290
}, "Query should be finished", TEST_TIMEOUT);
291291

292292
runs(function() {
293-
expect(returnedData.DATA[0].name).toEqual('aaron');
293+
expect(returnedData[0].data.name).toEqual('aaron');
294294
});
295295
});
296296

@@ -332,7 +332,7 @@ describe("ClearBlade Query usage with anonymous user", function() {
332332
}, "Query should be finished", TEST_TIMEOUT);
333333

334334
runs(function() {
335-
expect(returnedData.DATA).toEqual([]);
335+
expect(returnedData).toEqual([]);
336336
});
337337

338338
// Positive case -- should return an item
@@ -352,7 +352,7 @@ describe("ClearBlade Query usage with anonymous user", function() {
352352
}, "Query should be finished", TEST_TIMEOUT);
353353

354354
runs(function() {
355-
expect(returnedData.DATA[0].name).toEqual('aaron');
355+
expect(returnedData[0].data.name).toEqual('aaron');
356356
});
357357
});
358358

@@ -410,7 +410,7 @@ describe("ClearBlade Query usage with anonymous user", function() {
410410

411411
var isCharlieDeleted;
412412
runs(function() {
413-
expect(returnedData.DATA.length).toEqual(2);
413+
expect(returnedData.length).toEqual(2);
414414
// Cleanup
415415
var query2 = cbObj.Query();
416416
query2.equalTo('name', 'charlie');
@@ -513,7 +513,7 @@ describe("ClearBlade collections fetching", function () {
513513
}, "returnedData should not be undefined", TEST_TIMEOUT);
514514

515515
runs(function () {
516-
expect(returnedData.DATA[0].name).toEqual('aaron');
516+
expect(returnedData[0].data.name).toEqual('aaron');
517517
});
518518
});
519519
});
@@ -588,7 +588,7 @@ describe("ClearBlade collections CRUD should", function () {
588588
}, "returnedData should not be undefined", TEST_TIMEOUT);
589589

590590
runs(function () {
591-
expect(returnedData.DATA[0].name).toEqual('jim');
591+
expect(returnedData[0].data.name).toEqual('jim');
592592
});
593593
});
594594

@@ -634,7 +634,7 @@ describe("ClearBlade collections CRUD should", function () {
634634
}, "returnedData should not be undefined", TEST_TIMEOUT);
635635

636636
runs(function () {
637-
expect(returnedData.DATA[0].name).toEqual('john');
637+
expect(returnedData[0].data.name).toEqual('john');
638638
});
639639
});
640640

@@ -671,7 +671,7 @@ describe("ClearBlade collections CRUD should", function () {
671671
}, "returnedData should not be undefined", TEST_TIMEOUT);
672672

673673
runs(function () {
674-
expect(returnedData.DATA).toEqual([]);
674+
expect(returnedData).toEqual([]);
675675
});
676676
});
677677
});
@@ -753,7 +753,7 @@ describe("Query objects should", function () {
753753
}, "returned data should not be undefined", TEST_TIMEOUT);
754754

755755
runs(function () {
756-
expect(returnedData.DATA[0].name).toEqual('John');
756+
expect(returnedData[0].data.name).toEqual('John');
757757
});
758758
});
759759

@@ -788,7 +788,7 @@ describe("Query objects should", function () {
788788
}, "returned data should not be undefined", TEST_TIMEOUT);
789789

790790
runs(function () {
791-
expect(returnedData[0].data.age).toEqual(35);
791+
expect(returnedData[0].age).toEqual(35);
792792
});
793793
});
794794
});

0 commit comments

Comments
 (0)