From 09e388979300a40ff7715a7ce0c474dcd5319eb8 Mon Sep 17 00:00:00 2001 From: David Jay Date: Wed, 11 Jan 2017 15:42:56 -0500 Subject: [PATCH] Updating action type from to for consistency. --- models/comment.js | 2 +- tests/models/comment.js | 4 ++-- tests/routes/api/comments/index.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models/comment.js b/models/comment.js index b2bd0367c..3f9ae1a65 100644 --- a/models/comment.js +++ b/models/comment.js @@ -201,7 +201,7 @@ CommentSchema.statics.findByActionType = (action_type) => Action * @return {Promise} */ CommentSchema.statics.findIdsByActionType = (action_type) => Action - .findCommentsIdByActionType(action_type, 'comment') + .findCommentsIdByActionType(action_type, 'comments') .then((actions) => actions.map(a => a.item_id)); /** diff --git a/tests/models/comment.js b/tests/models/comment.js index 363fd9222..91f51ccb8 100644 --- a/tests/models/comment.js +++ b/tests/models/comment.js @@ -73,12 +73,12 @@ describe('models.Comment', () => { const actions = [{ action_type: 'flag', item_id: '3', - item_type: 'comment', + item_type: 'comments', user_id: '123' }, { action_type: 'like', item_id: '1', - item_type: 'comment', + item_type: 'comments', user_id: '456' }]; diff --git a/tests/routes/api/comments/index.js b/tests/routes/api/comments/index.js index 59160a36f..360daa5dc 100644 --- a/tests/routes/api/comments/index.js +++ b/tests/routes/api/comments/index.js @@ -58,11 +58,11 @@ describe('/api/v1/comments', () => { const actions = [{ action_type: 'flag', item_id: 'abc', - item_type: 'comment' + item_type: 'comments' }, { action_type: 'like', item_id: 'hij', - item_type: 'comment' + item_type: 'comments' }]; beforeEach(() => {