Files
habitica/test/api/user/DELETE-user.test.js
Jeremy Abbott e4269723e1 Creates initial PUT /user test
Adds missing semi-colon to DELETE-user.test.js
2015-10-26 10:54:37 -05:00

37 lines
804 B
JavaScript

import {
generateUser,
requester,
} from '../../helpers/api.helper';
describe('DELETE /user', () => {
let api;
beforeEach(() => {
return generateUser().then((user) => {
api = requester(user);
});
});
it('deletes the user', () => {
return expect(api.del('/user').then((fetchedUser) => {
return api.get('/user');
})).to.be.rejectedWith('No user found.');
});
context('user in solo group', () => {
it('deletes party when user is the only member');
it('deletes private guild when user is the only member');
});
context('user in group with members', () => {
it('removes user from all groups user was a part of');
it('chooses new group leader for any group user was the leader of');
it('removes invitations from groups');
});
});