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,26 @@
import {
generateUser,
} from '../../../../helpers/api-integration/v3';
describe('POST /user/disable-classes', () => {
let user;
beforeEach(async () => {
user = await generateUser();
});
// More tests in common code unit tests
it('disable classes', async () => {
let res = await user.post(`/user/disable-classes`);
await user.sync();
expect(res).to.eql({
data: JSON.parse(JSON.stringify({
preferences: user.preferences,
stats: user.stats,
flags: user.flags,
})),
});
});
});