mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fix test lint
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {generateUser} from '../../../../../helpers/api-integration/v3';
|
||||
import { generateUser } from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #cancelSubscribe', () => {
|
||||
let endpoint = '/iap/ios/subscribe/cancel?noRedirect=true';
|
||||
const endpoint = '/iap/ios/subscribe/cancel?noRedirect=true';
|
||||
let user;
|
||||
|
||||
beforeEach(async () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {generateUser, translate as t} from '../../../../../helpers/api-integration/v3';
|
||||
import { generateUser, translate as t } from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #norenewsubscribe', () => {
|
||||
let endpoint = '/iap/ios/norenew-subscribe';
|
||||
let sku = 'com.habitrpg.ios.habitica.subscription.3month';
|
||||
const endpoint = '/iap/ios/norenew-subscribe';
|
||||
const sku = 'com.habitrpg.ios.habitica.subscription.3month';
|
||||
let user;
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -50,7 +50,7 @@ describe('payments : apple #norenewsubscribe', () => {
|
||||
|
||||
await user.post(endpoint, {
|
||||
sku,
|
||||
transaction: {receipt: 'receipt'},
|
||||
transaction: { receipt: 'receipt' },
|
||||
gift: {
|
||||
uuid: '1',
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {generateUser, translate as t} from '../../../../../helpers/api-integration/v3';
|
||||
import { generateUser, translate as t } from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #subscribe', () => {
|
||||
let endpoint = '/iap/ios/subscribe';
|
||||
const endpoint = '/iap/ios/subscribe';
|
||||
let user;
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -37,7 +37,7 @@ describe('payments : apple #subscribe', () => {
|
||||
balance: 2,
|
||||
});
|
||||
|
||||
let sku = 'com.habitrpg.ios.habitica.subscription.3month';
|
||||
const sku = 'com.habitrpg.ios.habitica.subscription.3month';
|
||||
|
||||
await user.post(endpoint, {
|
||||
sku,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {generateUser, translate as t} from '../../../../../helpers/api-integration/v3';
|
||||
import { generateUser, translate as t } from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #verify', () => {
|
||||
let endpoint = '/iap/ios/verify';
|
||||
const endpoint = '/iap/ios/verify';
|
||||
let user;
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -36,7 +36,8 @@ describe('payments : apple #verify', () => {
|
||||
await user.post(endpoint, {
|
||||
transaction: {
|
||||
receipt: 'receipt',
|
||||
}});
|
||||
},
|
||||
});
|
||||
|
||||
expect(verifyStub).to.be.calledOnce;
|
||||
expect(verifyStub.args[0][0].user._id).to.eql(user._id);
|
||||
@@ -56,7 +57,8 @@ describe('payments : apple #verify', () => {
|
||||
},
|
||||
gift: {
|
||||
uuid: '1',
|
||||
}});
|
||||
},
|
||||
});
|
||||
|
||||
expect(verifyStub).to.be.calledOnce;
|
||||
expect(verifyStub.args[0][0].user._id).to.eql(user._id);
|
||||
|
||||
Reference in New Issue
Block a user