From d231eb30237b6d3ffc7b448e41d7f55a478a152e Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Fri, 9 Apr 2021 15:41:20 -0500 Subject: [PATCH] fix(test): force special spell purchasable for test --- test/api/v3/integration/user/buy/POST-user_buy.test.js | 3 +++ website/common/locales/en/limited.json | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/api/v3/integration/user/buy/POST-user_buy.test.js b/test/api/v3/integration/user/buy/POST-user_buy.test.js index 4b39704500..aee180d753 100644 --- a/test/api/v3/integration/user/buy/POST-user_buy.test.js +++ b/test/api/v3/integration/user/buy/POST-user_buy.test.js @@ -70,6 +70,7 @@ describe('POST /user/buy/:key', () => { it('buys a special spell', async () => { const key = 'spookySparkles'; const item = content.special[key]; + const stub = sinon.stub(item, 'canOwn').returns(true); await user.update({ 'stats.gp': 250 }); const res = await user.post(`/user/buy/${key}`); @@ -82,6 +83,8 @@ describe('POST /user/buy/:key', () => { expect(res.message).to.equal(t('messageBought', { itemText: item.text(), })); + + stub.restore(); }); it('allows for bulk purchases', async () => { diff --git a/website/common/locales/en/limited.json b/website/common/locales/en/limited.json index 179b6d7cd7..b6d262b1d7 100644 --- a/website/common/locales/en/limited.json +++ b/website/common/locales/en/limited.json @@ -28,10 +28,10 @@ "seasonalShopClosedTitle": "<%= linkStart %>Leslie<%= linkEnd %>", "seasonalShopTitle": "<%= linkStart %>Seasonal Sorceress<%= linkEnd %>", "seasonalShopClosedText": "The Seasonal Shop is currently closed!! It’s only open during Habitica’s four Grand Galas.", - "seasonalShopSummerText": "Happy Summer Splash!! Would you like to buy some rare items? They’ll only be available during the Gala!", - "seasonalShopFallText": "Happy Fall Festival!! Would you like to buy some rare items? They’ll only be available during the Gala!", - "seasonalShopWinterText": "Happy Winter Wonderland!! Would you like to buy some rare items? They’ll only be available during the Gala!", - "seasonalShopSpringText": "Happy Spring Fling!! Would you like to buy some rare items? They’ll only be available during the Gala!", + "seasonalShopSummerText": "Happy Summer Splash!! Would you like to buy some rare items? Be sure to get them before the Gala ends!", + "seasonalShopFallText": "Happy Fall Festival!! Would you like to buy some rare items? Be sure to get them before the Gala ends!", + "seasonalShopWinterText": "Happy Winter Wonderland!! Would you like to buy some rare items? Be sure to get them before the Gala ends!", + "seasonalShopSpringText": "Happy Spring Fling!! Would you like to buy some rare items? Be sure to get them before the Gala ends!", "seasonalShopFallTextBroken": "Oh.... Welcome to the Seasonal Shop... We're stocking autumn Seasonal Edition goodies, or something... Everything here will be available to purchase during the Fall Festival event each year, but we're only open until October 31... I guess you should to stock up now, or you'll have to wait... and wait... and wait... *sigh*", "seasonalShopBrokenText": "My pavilion!!!!!!! My decorations!!!! Oh, the Dysheartener's destroyed everything :( Please help defeat it in the Tavern so I can rebuild!", "seasonalShopRebirth": "If you bought any of this equipment in the past but don't currently own it, you can repurchase it in the Rewards Column. Initially, you'll only be able to purchase the items for your current class (Warrior by default), but fear not, the other class-specific items will become available if you switch to that class.",