From 15e62708b968e3a62097ed2122524a7acac9800b Mon Sep 17 00:00:00 2001 From: Talysson Date: Sat, 7 Oct 2017 00:44:29 -0300 Subject: [PATCH] Fix code to match linting rules --- src/app/user/GetUser.js | 2 +- test/features/api/users/deleteUser.spec.js | 2 +- test/unit/app/user/DeleteUser.spec.js | 2 +- test/unit/app/user/GetUser.spec.js | 2 +- test/unit/infra/user/SequelizeUsersRepository.spec.js | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/user/GetUser.js b/src/app/user/GetUser.js index f3bc7d2..2866d6f 100644 --- a/src/app/user/GetUser.js +++ b/src/app/user/GetUser.js @@ -21,6 +21,6 @@ class GetUser extends Operation { } } -GetUser.setOutputs(['SUCCESS', 'ERROR', 'NOT_FOUND']) +GetUser.setOutputs(['SUCCESS', 'ERROR', 'NOT_FOUND']); module.exports = GetUser; diff --git a/test/features/api/users/deleteUser.spec.js b/test/features/api/users/deleteUser.spec.js index 58f847c..cbb9e56 100644 --- a/test/features/api/users/deleteUser.spec.js +++ b/test/features/api/users/deleteUser.spec.js @@ -9,7 +9,7 @@ describe('API :: DELETE /api/users/:id', () => { name: 'User' }); - const { body } = await request() + await request() .delete(`/api/users/${user.id}`) .expect(202); }); diff --git a/test/unit/app/user/DeleteUser.spec.js b/test/unit/app/user/DeleteUser.spec.js index 0339ab6..a266e1c 100644 --- a/test/unit/app/user/DeleteUser.spec.js +++ b/test/unit/app/user/DeleteUser.spec.js @@ -7,7 +7,7 @@ describe('App :: User :: DeleteUser', () => { context('when user exists', () => { before(() => { const MockUsersRepository = { - remove: (id) => Promise.resolve() + remove: () => Promise.resolve() }; deleteUser = new DeleteUser({ diff --git a/test/unit/app/user/GetUser.spec.js b/test/unit/app/user/GetUser.spec.js index 0333f4f..70c5fc8 100644 --- a/test/unit/app/user/GetUser.spec.js +++ b/test/unit/app/user/GetUser.spec.js @@ -32,7 +32,7 @@ describe('App :: User :: GetUser', () => { context('when user does not exist', () => { beforeEach(() => { const MockUsersRepository = { - getById: (userId) => Promise.reject({ + getById: () => Promise.reject({ details: 'User with id 123 can\'t be found.' }) }; diff --git a/test/unit/infra/user/SequelizeUsersRepository.spec.js b/test/unit/infra/user/SequelizeUsersRepository.spec.js index acf5c88..3a34b85 100644 --- a/test/unit/infra/user/SequelizeUsersRepository.spec.js +++ b/test/unit/infra/user/SequelizeUsersRepository.spec.js @@ -134,7 +134,7 @@ describe('Infra :: User :: SequelizeUsersRepository', () => { return await repository.update(user.id, { name: 'New User' }); }).to.alter(async () => { const dbUser = await UserModel.findById(user.id); - return dbUser.name + return dbUser.name; }, { from: 'User', to: 'New User' }); }); }); @@ -153,7 +153,7 @@ describe('Infra :: User :: SequelizeUsersRepository', () => { } }).to.not.alter(async () => { const dbUser = await UserModel.findById(user.id); - return dbUser.name + return dbUser.name; }); }); });