mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
lint: Correct linting errors in api v3 tests
This commit is contained in:
@@ -2,7 +2,7 @@ import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration.helper';
|
||||
import _ from 'lodash';
|
||||
import { find } from 'lodash';
|
||||
|
||||
describe('POST /chat/:chatId/like', () => {
|
||||
let user;
|
||||
@@ -65,7 +65,7 @@ describe('POST /chat/:chatId/like', () => {
|
||||
return user.get(`/groups/${group._id}`);
|
||||
})
|
||||
.then((updatedGroup) => {
|
||||
let messageToCheck = _.find(updatedGroup.chat, {id: message.id});
|
||||
let messageToCheck = find(updatedGroup.chat, {id: message.id});
|
||||
expect(messageToCheck.likes[user._id]).to.equal(true);
|
||||
});
|
||||
});
|
||||
@@ -89,7 +89,7 @@ describe('POST /chat/:chatId/like', () => {
|
||||
return user.get(`/groups/${group._id}`);
|
||||
})
|
||||
.then((updatedGroup) => {
|
||||
let messageToCheck = _.find(updatedGroup.chat, {id: message.id});
|
||||
let messageToCheck = find(updatedGroup.chat, {id: message.id});
|
||||
expect(messageToCheck.likes[user._id]).to.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user