raise coverage for user api calls (#10099)

* user integration tests

* fix lint
This commit is contained in:
negue
2018-03-17 21:12:53 +01:00
committed by Matteo Pagliazzi
parent 3d4107db3e
commit 1812f63812
4 changed files with 100 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
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 () => {
let buyList = await user.get('/user/in-app-rewards');
expect(_.find(buyList, item => {
return item.text === t('armorWarrior1Text');
})).to.exist;
expect(_.find(buyList, item => {
return item.text === t('armorWarrior2Text');
})).to.not.exist;
});
});