Updated task model to allow setting streak (#7306)

This commit is contained in:
Keith Holliday
2016-05-16 13:12:46 -05:00
committed by Matteo Pagliazzi
parent cfb5e2be60
commit dbd6daeca0
2 changed files with 2 additions and 4 deletions

View File

@@ -108,7 +108,7 @@ describe('POST /tasks/user', () => {
});
it(`ignores setting userId, history, createdAt,
updatedAt, challenge, completed, streak,
updatedAt, challenge, completed,
dateCompleted fields`, async () => {
let task = await user.post('/tasks/user', {
text: 'test daily',
@@ -119,7 +119,6 @@ describe('POST /tasks/user', () => {
updatedAt: 'tomorrow',
challenge: 'no',
completed: true,
streak: 25,
dateCompleted: 'never',
value: 324, // ignored because not a reward
});
@@ -130,7 +129,6 @@ describe('POST /tasks/user', () => {
expect(task.updatedAt).not.to.equal('tomorrow');
expect(task.challenge).not.to.equal('no');
expect(task.completed).to.equal(false);
expect(task.streak).to.equal(0);
expect(task.streak).not.to.equal('never');
expect(task.value).not.to.equal(324);
});