This commit is contained in:
@@ -1299,7 +1299,7 @@ describe('miscellaneous', function() {
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
it('properly returns incremented values (#1554)', (done) => {
|
||||
let headers = {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -1312,12 +1312,12 @@ describe('miscellaneous', function() {
|
||||
json: true
|
||||
};
|
||||
let object = new Parse.Object('AnObject');;
|
||||
|
||||
|
||||
function runIncrement(amount) {
|
||||
let options = Object.assign({}, requestOptions, {
|
||||
body: {
|
||||
"key": {
|
||||
__op: 'Increment',
|
||||
__op: 'Increment',
|
||||
amount: amount
|
||||
}
|
||||
},
|
||||
@@ -1333,7 +1333,7 @@ describe('miscellaneous', function() {
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
object.save().then(() => {
|
||||
return runIncrement(1);
|
||||
}).then((res) => {
|
||||
@@ -1345,4 +1345,30 @@ describe('miscellaneous', function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('ignores _RevocableSession "header" send by JS SDK', (done) => {
|
||||
let object = new Parse.Object('AnObject');
|
||||
object.set('a', 'b');
|
||||
object.save().then(() => {
|
||||
request.post({
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
url: 'http://localhost:8378/1/classes/AnObject',
|
||||
body: {
|
||||
_method: 'GET',
|
||||
_ApplicationId: 'test',
|
||||
_JavaScriptKey: 'test',
|
||||
_ClientVersion: 'js1.8.3',
|
||||
_InstallationId: 'iid',
|
||||
_RevocableSession: "1",
|
||||
},
|
||||
json: true
|
||||
}, (err, res, body) => {
|
||||
expect(body.error).toBeUndefined();
|
||||
expect(body.results).not.toBeUndefined();
|
||||
expect(body.results.length).toBe(1);
|
||||
let result = body.results[0];
|
||||
expect(result.a).toBe('b');
|
||||
done();
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user