Change $type of date for todos (#12779)

* change $type to date for task and add new test

* adjust apidocs to reflect type change

* migration test for api date $type change

* minor fixes to migration

* unset instead of set empty string

* add type filter

* fix(todo date migration): make sure the update command works and limit update ops

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
Shadow
2020-12-24 11:37:09 -06:00
committed by GitHub
parent 2c44f766cd
commit 7c0b3612f0
4 changed files with 77 additions and 5 deletions

View File

@@ -220,6 +220,18 @@ describe('POST /tasks/user', () => {
});
});
it('errors if todo due date supplied is an invalid date', async () => {
await expect(user.post('/tasks/user', {
type: 'todo',
text: 'todo text',
date: 'invalid date',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: 'todo validation failed',
});
});
context('sending task activity webhooks', () => {
before(async () => {
await server.start();