mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
23 lines
567 B
JavaScript
23 lines
567 B
JavaScript
import {
|
|
generateUser,
|
|
translate as t,
|
|
} from '../../../../helpers/api-integration/v3';
|
|
|
|
describe('GET /user/inventory/buy', () => {
|
|
let user;
|
|
|
|
before(async () => {
|
|
user = await generateUser();
|
|
});
|
|
|
|
// More tests in common code unit tests
|
|
|
|
it('returns the gear items available for purchase', async () => {
|
|
const buyList = await user.get('/user/inventory/buy');
|
|
|
|
expect(_.find(buyList, item => item.text === t('armorWarrior1Text'))).to.exist;
|
|
|
|
expect(_.find(buyList, item => item.text === t('armorWarrior2Text'))).to.not.exist;
|
|
});
|
|
});
|