From b1018823d3d2174f5de85ba13e2caf767fd6105e Mon Sep 17 00:00:00 2001 From: David Jay Date: Fri, 9 Dec 2016 13:24:36 -0500 Subject: [PATCH] Updating tests and removing unecessary log statement. --- routes/api/user/index.js | 1 - tests/routes/api/comments/index.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api/user/index.js b/routes/api/user/index.js index c5cf3d336..581330c9f 100644 --- a/routes/api/user/index.js +++ b/routes/api/user/index.js @@ -158,7 +158,6 @@ router.put('/:user_id/bio', (req, res, next) => { }); router.post('/:user_id/actions', authorization.needed(), (req, res, next) => { - console.log('Hit action endpoint'); const { action_type, field, diff --git a/tests/routes/api/comments/index.js b/tests/routes/api/comments/index.js index bf7a06ff6..24a504cd3 100644 --- a/tests/routes/api/comments/index.js +++ b/tests/routes/api/comments/index.js @@ -350,11 +350,12 @@ describe('/api/v1/comments/:comment_id/actions', () => { return chai.request(app) .post('/api/v1/comments/abc/actions') .set(passport.inject({id: '456', roles: ['admin']})) - .send({'user_id': '456', 'action_type': 'flag'}) + .send({'action_type': 'flag', 'detail': 'Comment is too awesome.'}) .then((res) => { expect(res).to.have.status(201); expect(res).to.have.body; expect(res.body).to.have.property('action_type', 'flag'); + expect(res.body).to.have.property('detail', 'Comment is too awesome.'); expect(res.body).to.have.property('item_id', 'abc'); }); });