summaryrefslogtreecommitdiffstats
path: root/graphcool/src/createCharge.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'graphcool/src/createCharge.test.js')
-rw-r--r--graphcool/src/createCharge.test.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphcool/src/createCharge.test.js b/graphcool/src/createCharge.test.js
new file mode 100644
index 0000000..65dde47
--- /dev/null
+++ b/graphcool/src/createCharge.test.js
@@ -0,0 +1,23 @@
+const takeMoney = require('./createCharge');
+
+const event = {
+ "data": {
+ "user": "cj6ntm8qic3260140vkuzif9d",
+ "token": "tok_visa",
+ },
+ "context": {
+ "headers": {}
+ }
+}
+
+
+describe('Take Money', () => {
+
+ test('A charge has come back', async () => {
+ const res = await takeMoney(event);
+ console.log(res);
+ expect(res.data.amount).toBeGreaterThanOrEqual(0);
+ });
+
+});
+