mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
port disable classes and change class ops
This commit is contained in:
27
test/api/v3/integration/user/POST-user_change-class.test.js
Normal file
27
test/api/v3/integration/user/POST-user_change-class.test.js
Normal 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,
|
||||
})),
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user