port disable classes and change class ops

This commit is contained in:
Matteo Pagliazzi
2016-03-24 14:25:30 +01:00
parent 23f92e2d28
commit 159b9eaa8d
9 changed files with 312 additions and 44 deletions

View File

@@ -0,0 +1,27 @@
import {
generateUser,
} from '../../../../helpers/api-integration/v3';
describe('POST /user/change-class', () => {
let user;
beforeEach(async () => {
user = await generateUser();
});
// More tests in common code unit tests
it('changes class', async () => {
let res = await user.post(`/user/change-class?class=rogue`);
await user.sync();
expect(res).to.eql({
data: JSON.parse(JSON.stringify({
preferences: user.preferences,
stats: user.stats,
flags: user.flags,
items: user.items,
})),
});
});
});