1
0
mirror of synced 2026-08-03 21:56:54 +00:00

sample ajax request

This commit is contained in:
Rimian Perkins
2017-02-15 14:10:52 +11:00
parent 4d2c52e3f2
commit e1778d6bd8
4 changed files with 42 additions and 19 deletions
@@ -1,5 +1,21 @@
import { acceptance } from 'helpers/qunit-helpers';
acceptance('Discourse Payments', { loggedIn: true });
acceptance('Discourse Payments', {
loggedIn: true,
setup() {
const response = (object) => {
return [
200,
{"Content-Type": "application/json"},
object
];
};
server.post('/payments', () => {
return response({ });
});
}
}
);
test('Payments Link Exists', () => {
visit('/users/eviltrout');
@@ -21,9 +37,9 @@ test('Payments Page Exists', () => {
test('Payments Page response happens', () => {
visit('/users/eviltrout/payments');
click('.choice-btn');
click('.payment-btn');
andThen(() => {
ok(exists('.choice-response'), 'Response happens');
ok(exists('.payment-response'), 'Response happens');
});
});