summaryrefslogtreecommitdiffstats
path: root/graphcool-old/src/createCharge.test.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-01-30 12:39:31 -0500
committerWes Bos <wesbos@gmail.com>2018-01-30 12:39:31 -0500
commit0a1648bf47490b312169c531aeb51ef4725e8d2e (patch)
treea9c3dd7b50bc8dd563d9efeee3eeafaca1b3019a /graphcool-old/src/createCharge.test.js
parent0f1b9240bbd05b377e868faf78b89b509a3d7537 (diff)
Saying goodbye to graphcool
Diffstat (limited to 'graphcool-old/src/createCharge.test.js')
-rw-r--r--graphcool-old/src/createCharge.test.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphcool-old/src/createCharge.test.js b/graphcool-old/src/createCharge.test.js
new file mode 100644
index 0000000..65dde47
--- /dev/null
+++ b/graphcool-old/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);
+ });
+
+});
+