mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
29 lines
763 B
JavaScript
29 lines
763 B
JavaScript
import {
|
|
generateUser,
|
|
translate as t,
|
|
} from '../../../../helpers/api-integration/v3';
|
|
|
|
describe('GET /shops/quests', () => {
|
|
let user;
|
|
|
|
beforeEach(async () => {
|
|
user = await generateUser();
|
|
});
|
|
|
|
it('returns a valid shop object', async () => {
|
|
const shop = await user.get('/shops/quests');
|
|
|
|
expect(shop.identifier).to.equal('questShop');
|
|
expect(shop.text).to.eql(t('quests'));
|
|
expect(shop.notes).to.eql(t('ianTextMobile'));
|
|
expect(shop.imageName).to.be.a('string');
|
|
expect(shop.categories).to.be.an('array');
|
|
|
|
const categories = shop.categories.map(cat => cat.identifier);
|
|
|
|
expect(categories).to.include('unlockable');
|
|
expect(categories).to.include('gold');
|
|
expect(categories).to.include('pet');
|
|
});
|
|
});
|