mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
* Moved amazon tests to folder * Abstracted amazon payment code and added initial test * Abstracted cancel and subscribe logic to amazon payment lib * Added arg checks to checkout * Added constants. Added more subscription test * Added with arg checks to cancel * Fixed linting issues * Added integration tests for amazon subscribe cancel * Added integration test for amazon checkout * Added integration test for amazon subscribe * Added coupon unit test * Fixed lint * Fixed minor test issue and changed header expectations * Fixed line endings
21 lines
470 B
JavaScript
21 lines
470 B
JavaScript
import {
|
|
generateUser,
|
|
} from '../../../../../helpers/api-integration/v3';
|
|
|
|
describe('payments : amazon', () => {
|
|
let endpoint = '/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: 'Missing req.body.access_token',
|
|
});
|
|
});
|
|
});
|