v3: port getBuyList and shared.updateStore

This commit is contained in:
Matteo Pagliazzi
2016-03-26 16:25:15 +01:00
parent 93b80352c4
commit 3002c9b7fd
5 changed files with 130 additions and 27 deletions
@@ -0,0 +1,26 @@
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 () => {
let buyList = await user.get('/user/inventory/buy');
expect(_.find(buyList, item => {
return item.text === t('armorWarrior1Text');
})).to.exist;
expect(_.find(buyList, item => {
return item.text === t('armorWarrior2Text');
})).to.not.exist;
});
});