Files
habitica/test/api/v3/integration/user/GET-user_inAppRewards.test.js
Matteo Pagliazzi 85fb5f33aa fix test lint
2019-10-08 20:45:38 +02:00

21 lines
528 B
JavaScript

import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
describe('GET /user/in-app-rewards', () => {
let user;
before(async () => {
user = await generateUser();
});
it('returns the reward items available for purchase', async () => {
const buyList = await user.get('/user/in-app-rewards');
expect(_.find(buyList, item => item.text === t('armorWarrior1Text'))).to.exist;
expect(_.find(buyList, item => item.text === t('armorWarrior2Text'))).to.not.exist;
});
});