mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +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.
23 lines
495 B
JavaScript
23 lines
495 B
JavaScript
import {
|
|
generateUser,
|
|
} from '../../../../helpers/api-integration/v3';
|
|
|
|
describe('payments - amazon - #checkout', () => {
|
|
let endpoint = '/payments/amazon/checkout';
|
|
let user;
|
|
|
|
beforeEach(async () => {
|
|
user = await generateUser();
|
|
});
|
|
|
|
it('verifies credentials', async (done) => {
|
|
try {
|
|
await user.post(endpoint);
|
|
} catch (e) {
|
|
expect(e.error).to.eql('BadRequest');
|
|
expect(e.message.type).to.eql('InvalidParameterValue');
|
|
done();
|
|
}
|
|
});
|
|
});
|