convert buyQuest (gold) to the purchase refactoring / check quantity to be a number (#10244)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
generateUser,
|
||||
} from '../../../helpers/common.helper';
|
||||
import buyQuest from '../../../../website/common/script/ops/buy/buyQuest';
|
||||
import {BuyQuestWithGoldOperation} from '../../../../website/common/script/ops/buy/buyQuest';
|
||||
import {
|
||||
BadRequest,
|
||||
NotAuthorized,
|
||||
@@ -13,6 +13,12 @@ describe('shared.ops.buyQuest', () => {
|
||||
let user;
|
||||
let analytics = {track () {}};
|
||||
|
||||
function buyQuest (_user, _req, _analytics) {
|
||||
const buyOp = new BuyQuestWithGoldOperation(_user, _req, _analytics);
|
||||
|
||||
return buyOp.purchase();
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
user = generateUser();
|
||||
sinon.stub(analytics, 'track');
|
||||
|
||||
Reference in New Issue
Block a user