tests(fix): Add return to expect promise in create task test

This commit is contained in:
Blade Barringer
2015-12-04 09:13:50 -06:00
parent 1e9386f7b6
commit c2ba90afcc

View File

@@ -19,7 +19,7 @@ describe('POST /tasks', () => {
context('checks "req.body.type"', () => { context('checks "req.body.type"', () => {
it('returns an error if req.body.type is absent', () => { it('returns an error if req.body.type is absent', () => {
expect(api.post('/tasks', { return expect(api.post('/tasks', {
notType: 'habit', notType: 'habit',
})).to.eventually.be.rejected.and.eql({ })).to.eventually.be.rejected.and.eql({
code: 400, code: 400,
@@ -29,7 +29,7 @@ describe('POST /tasks', () => {
}); });
it('returns an error if req.body.type is not valid', () => { it('returns an error if req.body.type is not valid', () => {
expect(api.post('/tasks', { return expect(api.post('/tasks', {
type: 'habitF', type: 'habitF',
})).to.eventually.be.rejected.and.eql({ })).to.eventually.be.rejected.and.eql({
code: 400, code: 400,