diff --git a/test/api/groups/GET-groups.test.js b/test/api/groups/GET-groups.test.js index 3402ba8499..86be49a810 100644 --- a/test/api/groups/GET-groups.test.js +++ b/test/api/groups/GET-groups.test.js @@ -81,12 +81,7 @@ describe('GET /groups', () => { context('no query passed in', () => { - xit('lists all public guilds, the tavern, user\'s party, and any private guilds that user is a part of - TODO query includes duplicates - IE, tavern is included as tavern and part of public guilds. Refactor so this is not the case', (done) => { - api.get('/groups').then((groups) => { - expect(groups.length).to.eql(4); - done(); - }).catch(done); - }); + xit('lists all public guilds, the tavern, user\'s party, and any private guilds that user is a part of - TODO query includes duplicates - IE, tavern is included as tavern and part of public guilds. Refactor so this is not the case'); }); context('tavern passed in as query', () => { diff --git a/test/api/groups/POST-groups.test.js b/test/api/groups/POST-groups.test.js index 7af12bd3a6..f54fb7440c 100644 --- a/test/api/groups/POST-groups.test.js +++ b/test/api/groups/POST-groups.test.js @@ -16,15 +16,12 @@ describe('POST /groups', () => { }); }); - xit('returns defaults? (TODO: it\'s possible to create a group without a type. Should the group default to party? Should we require type to be set?', (done) => { - api.post('/groups').then((group) => { + xit('returns defaults? (TODO: it\'s possible to create a group without a type. Should the group default to party? Should we require type to be set?', () => { + return api.post('/groups').then((group) => { expect(group._id).to.exist; expect(group.name).to.eql(`${leader.profile.name}'s group`); expect(group.type).to.eql('party'); expect(group.privacy).to.eql('private'); - done(); - }).catch((err) => { - done(err); }); }); @@ -86,18 +83,11 @@ describe('POST /groups', () => { })).to.be.rejectedWith('Already in a party, try refreshing.'); }) - xit('prevents creating a public party. TODO: it is possible to create a public party. Should we send back an error? Automatically switch the privacy to private?', (done) => { - api.post('/groups', { + xit('prevents creating a public party. TODO: it is possible to create a public party. Should we send back an error? Automatically switch the privacy to private?', () => { + return expect(api.post('/groups', { type: 'party', privacy: 'public', - }) - .then((group) => { - done('Unexpected success'); - }) - .catch((err) => { - expect(err).to.eql('Parties must be private'); - done(); - }); + })).to.be.rejectedWith('Parties must be private'); }); });