Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 0 additions & 13 deletions spec/PushController.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,6 @@ describe('PushController', () => {
done();
});

it('can throw on validateDeviceType when single invalid device type is set', done => {
Copy link
Member Author

@dplewis dplewis Feb 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm deleting this test as it already exists. Jasmine acts funny with duplicate ids

Screen Shot 2021-02-20 at 2 52 24 PM

// Make query condition
const where = {
deviceType: 'osx',
};
const validPushTypes = ['ios', 'android'];

expect(function () {
validatePushType(where, validPushTypes);
}).toThrow();
done();
});

it('can get expiration time in string format', done => {
// Make mock request
const timeStr = '2015-03-19T22:05:08Z';
Expand Down
2 changes: 2 additions & 0 deletions spec/PushWorker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ describe('PushWorker', () => {
amount: 1,
},
count: { __op: 'Increment', amount: -1 },
status: 'running',
});
const query = new Parse.Query('_PushStatus');
return query.get(handler.objectId, { useMasterKey: true });
Expand Down Expand Up @@ -409,6 +410,7 @@ describe('PushWorker', () => {
amount: 1,
},
count: { __op: 'Increment', amount: -1 },
status: 'running',
});
done();
});
Expand Down
3 changes: 1 addition & 2 deletions src/StatusHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,8 @@ export function pushStatusHandler(config, existingObjectId) {
}
);
}

// indicate this batch is complete
incrementOp(update, 'count', -1);
update.status = 'running';

return handler.update({ objectId }, update).then(res => {
if (res && res.count === 0) {
Expand Down