Files
habitica/test/api/v3/integration/payments/POST-payments_amazon_subscribe.test.js
Victor Pudeyev fa21577c46 V3 payments 6 (#7104)
* 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.
2016-04-27 21:26:32 +02:00

22 lines
501 B
JavaScript

import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
describe('payments - amazon - #subscribe', () => {
let endpoint = '/payments/amazon/subscribe';
let user;
beforeEach(async () => {
user = await generateUser();
});
it('verifies subscription code', async () => {
await expect(user.post(endpoint)).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: t('missingSubscriptionCode'),
});
});
});