mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
fix tests
This commit is contained in:
committed by
Phillip Thelen
parent
64a3515c10
commit
614850e56c
@@ -290,7 +290,7 @@ describe('Apple Payments', () => {
|
||||
iap.getPurchaseData.restore();
|
||||
iapGetPurchaseDataStub = sinon.stub(iap, 'getPurchaseData')
|
||||
.returns([{
|
||||
expirationDate: moment.utc().add({ day: 1 }).toDate(),
|
||||
expirationDate: moment.utc().add({ day: 2 }).toDate(),
|
||||
purchaseDate: new Date(),
|
||||
productId: option.sku,
|
||||
transactionId: token,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { generateUser, translate as t } from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #subscribe', () => {
|
||||
describe.only('payments : apple #subscribe', () => {
|
||||
const endpoint = '/iap/ios/subscribe';
|
||||
let user;
|
||||
|
||||
@@ -45,11 +45,10 @@ describe('payments : apple #subscribe', () => {
|
||||
});
|
||||
|
||||
expect(subscribeStub).to.be.calledOnce;
|
||||
expect(subscribeStub.args[0][0]).to.eql(sku);
|
||||
expect(subscribeStub.args[0][1]._id).to.eql(user._id);
|
||||
expect(subscribeStub.args[0][2]).to.eql('receipt');
|
||||
expect(subscribeStub.args[0][3]['x-api-key']).to.eql(user.apiToken);
|
||||
expect(subscribeStub.args[0][3]['x-api-user']).to.eql(user._id);
|
||||
expect(subscribeStub.args[0][0]._id).to.eql(user._id);
|
||||
expect(subscribeStub.args[0][1]).to.eql('receipt');
|
||||
expect(subscribeStub.args[0][2]['x-api-key']).to.eql(user.apiToken);
|
||||
expect(subscribeStub.args[0][2]['x-api-user']).to.eql(user._id);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user