mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
* payments api: cancelSubscription * some more tests for amazon payments * promisifying amazon payments * somehow payment stub is not working * cleaning up tests * renaming tests in api/v3/integration/payments * improvements * cleanup, lint * fixes as per comments * moment.zone() is back in.
22 lines
486 B
JavaScript
22 lines
486 B
JavaScript
import {
|
|
generateUser,
|
|
translate as t,
|
|
} from '../../../../helpers/api-integration/v3';
|
|
|
|
describe('payments : amazon', () => {
|
|
let endpoint = '/payments/amazon/verifyAccessToken';
|
|
let user;
|
|
|
|
beforeEach(async () => {
|
|
user = await generateUser();
|
|
});
|
|
|
|
it('verifies access token', async () => {
|
|
await expect(user.post(endpoint)).to.eventually.be.rejected.and.eql({
|
|
code: 400,
|
|
error: 'BadRequest',
|
|
message: t('missingAccessToken'),
|
|
});
|
|
});
|
|
});
|