Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions integration/test/IdempotencyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ describe('Idempotency', () => {

it('handle duplicate job request', async () => {
DuplicateRequestId('1234');
const params = { startedBy: 'Monty Python' };
const jobStatusId = await Parse.Cloud.startJob('CloudJob1', params);
await expectAsync(Parse.Cloud.startJob('CloudJob1', params)).toBeRejectedWithError(
const jobStatusId = await Parse.Cloud.startJob('CloudJob1', {});
await expectAsync(Parse.Cloud.startJob('CloudJob1', {})).toBeRejectedWithError(
'Duplicate request'
);

Expand All @@ -49,7 +48,6 @@ describe('Idempotency', () => {
}
const jobStatus = await Parse.Cloud.getJobStatus(jobStatusId);
expect(jobStatus.get('status')).toBe('succeeded');
expect(jobStatus.get('params').startedBy).toBe('Monty Python');
});

it('handle duplicate POST / PUT request', async () => {
Expand Down
4 changes: 1 addition & 3 deletions integration/test/ParseCloudTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ describe('Parse Cloud', () => {
});

it('run job', async () => {
const params = { startedBy: 'Monty Python' };
const jobStatusId = await Parse.Cloud.startJob('CloudJob1', params);
const jobStatusId = await Parse.Cloud.startJob('CloudJob1', {});
expect(jobStatusId).toBeDefined();
await waitForJobStatus(jobStatusId, 'succeeded');

const jobStatus = await Parse.Cloud.getJobStatus(jobStatusId);
assert.equal(jobStatus.get('status'), 'succeeded');
assert.equal(jobStatus.get('params').startedBy, 'Monty Python');
});

it('run long job', async () => {
Expand Down