From 00e5896ac6caebd08c3343f6616b6e6aa0ff182d Mon Sep 17 00:00:00 2001 From: Grayson Gilmore Date: Tue, 6 Jun 2017 20:45:41 -0500 Subject: [PATCH] Add test for GET /shops/backgrounds (#8771) --- .../shops/GET-shops_backgrounds.test.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/api/v3/integration/shops/GET-shops_backgrounds.test.js diff --git a/test/api/v3/integration/shops/GET-shops_backgrounds.test.js b/test/api/v3/integration/shops/GET-shops_backgrounds.test.js new file mode 100644 index 0000000000..738b92dde3 --- /dev/null +++ b/test/api/v3/integration/shops/GET-shops_backgrounds.test.js @@ -0,0 +1,25 @@ +import { + generateUser, + translate as t, +} from '../../../../helpers/api-integration/v3'; + +describe('GET /shops/backgrounds', () => { + let user; + + beforeEach(async () => { + user = await generateUser(); + }); + + it('returns a valid shop object', async () => { + let shop = await user.get('/shops/backgrounds'); + expect(shop.identifier).to.equal('backgroundShop'); + expect(shop.text).to.eql(t('backgroundShop')); + expect(shop.notes).to.eql(t('backgroundShopText')); + expect(shop.imageName).to.equal('background_shop'); + expect(shop.sets).to.be.an('array'); + + let sets = shop.sets.map(set => set.identifier); + expect(sets).to.include('incentiveBackgrounds'); + expect(sets).to.include('backgrounds062014'); + }); +}); \ No newline at end of file