import {
generateUser,
} from '../../../../helpers/api-integration/v3';
describe('payments - stripe - #checkout', () => {
let endpoint = '/stripe/checkout';
let user;
beforeEach(async () => {
user = await generateUser();
});
it('verifies credentials', async () => {
await expect(user.post(endpoint, {id: 123})).to.eventually.be.rejected.and.eql({
code: 401,
error: 'Error',
message: 'Invalid API Key provided: ****************************1111',
});
});
});
1) payments - stripe - #checkout verifies credentials:
AssertionError: expected { Object (code, error, ...) } to deeply equal { Object (code, error, ...) }
+ expected - actual
{
- "code": 500
- "error": "InternalServerError"
- "message": "An unexpected error occurred."
+ "code": 401
+ "error": "Error"
+ "message": "Invalid API Key provided: ****************************1111"
}