mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 20:25:48 +08:00
Updating tests and removing unecessary log statement.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user