From ff1e5ef221adecd3cb24d780d2a80f7900023114 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sat, 2 Jan 2016 18:28:06 -0600 Subject: [PATCH] lint: Use eslint --fix to automatically fix some issues in api v2 tests --- test/api/v2/groups/GET-groups_id.test.js | 2 +- test/api/v2/groups/POST-groups.test.js | 2 +- test/api/v2/user/DELETE-user.test.js | 12 ++++++------ test/api/v2/user/GET-user.test.js | 6 +++--- .../user/batch-update/POST-user_batch-update.test.js | 12 ++++++------ test/api/v2/user/tasks/DELETE-tasks_id.test.js | 4 ++-- test/api/v2/user/tasks/GET-tasks_id.test.js | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/api/v2/groups/GET-groups_id.test.js b/test/api/v2/groups/GET-groups_id.test.js index 7ecc9dc319..531c050bde 100644 --- a/test/api/v2/groups/GET-groups_id.test.js +++ b/test/api/v2/groups/GET-groups_id.test.js @@ -305,7 +305,7 @@ describe('GET /groups/:id', () => { }); it('returns the user\'s party if an id of "party" is passed in', async () => { - let group = await member.get('/groups/party') + let group = await member.get('/groups/party'); expect(group._id).to.eql(createdGroup._id); expect(group.name).to.eql(createdGroup.name); diff --git a/test/api/v2/groups/POST-groups.test.js b/test/api/v2/groups/POST-groups.test.js index 4d1dfb2d23..75c4128921 100644 --- a/test/api/v2/groups/POST-groups.test.js +++ b/test/api/v2/groups/POST-groups.test.js @@ -113,7 +113,7 @@ describe('POST /groups', () => { let guild = await leader.post('/groups', { type: 'guild', privacy: 'public', - }) + }); expect(guild.leader).to.eql(leader._id); }); diff --git a/test/api/v2/user/DELETE-user.test.js b/test/api/v2/user/DELETE-user.test.js index 245a175cfd..fca6d81b6e 100644 --- a/test/api/v2/user/DELETE-user.test.js +++ b/test/api/v2/user/DELETE-user.test.js @@ -37,9 +37,9 @@ describe('DELETE /user', () => { }); it('deletes party when user is the only member', async () => { - return expect(user.del('/user').then((result) => { - return checkExistence('groups', party._id); - })).to.eventually.eql(false); + return expect(user.del('/user').then((result) => { + return checkExistence('groups', party._id); + })).to.eventually.eql(false); }); }); @@ -56,9 +56,9 @@ describe('DELETE /user', () => { }); it('deletes guild when user is the only member', async () => { - return expect(user.del('/user').then((result) => { - return checkExistence('groups', guild._id); - })).to.eventually.eql(false); + return expect(user.del('/user').then((result) => { + return checkExistence('groups', guild._id); + })).to.eventually.eql(false); }); }); diff --git a/test/api/v2/user/GET-user.test.js b/test/api/v2/user/GET-user.test.js index 681997408c..b2aaf7d066 100644 --- a/test/api/v2/user/GET-user.test.js +++ b/test/api/v2/user/GET-user.test.js @@ -18,11 +18,11 @@ describe('GET /user', () => { }); it('does not include password information', async () => { - expect(user.auth.local.hashed_password).to.not.exist - expect(user.auth.local.salt).to.not.exist + expect(user.auth.local.hashed_password).to.not.exist; + expect(user.auth.local.salt).to.not.exist; }); it('does not include api token', async () => { - expect(user.apiToken).to.not.exist + expect(user.apiToken).to.not.exist; }); }); diff --git a/test/api/v2/user/batch-update/POST-user_batch-update.test.js b/test/api/v2/user/batch-update/POST-user_batch-update.test.js index 9d8072c0ba..19c1f7b64b 100644 --- a/test/api/v2/user/batch-update/POST-user_batch-update.test.js +++ b/test/api/v2/user/batch-update/POST-user_batch-update.test.js @@ -47,9 +47,9 @@ describe('POST /user/batch-update', () => { return expect(user.post('/user/batch-update', [ { op: operation }, ])).to.eventually.be.rejected.and.eql({ - code: 500, - text: t('messageUserOperationNotFound', { operation }), - }); + code: 500, + text: t('messageUserOperationNotFound', { operation }), + }); }); }); }); @@ -59,9 +59,9 @@ describe('POST /user/batch-update', () => { return expect(user.post('/user/batch-update', [ {op: 'aNotRealOperation'}, ])).to.eventually.be.rejected.and.eql({ - code: 500, - text: t('messageUserOperationNotFound', { operation: 'aNotRealOperation' }), - }); + code: 500, + text: t('messageUserOperationNotFound', { operation: 'aNotRealOperation' }), + }); }); }); }); diff --git a/test/api/v2/user/tasks/DELETE-tasks_id.test.js b/test/api/v2/user/tasks/DELETE-tasks_id.test.js index 2df05d894c..9c734c2e83 100644 --- a/test/api/v2/user/tasks/DELETE-tasks_id.test.js +++ b/test/api/v2/user/tasks/DELETE-tasks_id.test.js @@ -18,7 +18,7 @@ describe('DELETE /user/tasks/:id', () => { })).to.eventually.be.rejected.and.eql({ code: 404, text: t('messageTaskNotFound'), - }); + }); }); it('returns an error if the task does not exist', async () => { @@ -26,7 +26,7 @@ describe('DELETE /user/tasks/:id', () => { .to.eventually.be.rejected.and.eql({ code: 404, text: t('messageTaskNotFound'), - }); + }); }); it('does not delete another user\'s task', async () => { diff --git a/test/api/v2/user/tasks/GET-tasks_id.test.js b/test/api/v2/user/tasks/GET-tasks_id.test.js index 9f092c1693..c57f9c0038 100644 --- a/test/api/v2/user/tasks/GET-tasks_id.test.js +++ b/test/api/v2/user/tasks/GET-tasks_id.test.js @@ -26,7 +26,7 @@ describe('GET /user/tasks/:id', () => { .to.eventually.be.rejected.and.eql({ code: 404, text: t('messageTaskNotFound'), - }); + }); }); it('does not get another user\'s task', async () => {