1
0
mirror of synced 2026-08-05 14:47:03 +00:00

stripe elements form submits a payment to stripe api

This commit is contained in:
Rimian Perkins
2017-02-16 16:29:42 +11:00
parent e1778d6bd8
commit de9a5cb6f9
9 changed files with 117 additions and 66 deletions
@@ -1,21 +1,5 @@
import { acceptance } from 'helpers/qunit-helpers';
acceptance('Discourse Payments', {
loggedIn: true,
setup() {
const response = (object) => {
return [
200,
{"Content-Type": "application/json"},
object
];
};
server.post('/payments', () => {
return response({ });
});
}
}
);
acceptance('Discourse Payments', { loggedIn: true });
test('Payments Link Exists', () => {
visit('/users/eviltrout');
@@ -24,22 +8,3 @@ test('Payments Link Exists', () => {
ok(exists('.discourse-payments > a'), 'Link exists on profile page');
});
});
test('Payments Page Exists', () => {
visit('/users/eviltrout/payments');
andThen(() => {
ok(exists('h1'), 'Heading exists');
ok($.trim($('.payments').text()) == 'eviltrout', 'username is present on page');
});
});
test('Payments Page response happens', () => {
visit('/users/eviltrout/payments');
click('.payment-btn');
andThen(() => {
ok(exists('.payment-response'), 'Response happens');
});
});