summaryrefslogtreecommitdiffstats
path: root/frontend/__tests__
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/__tests__')
-rw-r--r--frontend/__tests__/TakeMyMoney.test.js12
-rw-r--r--frontend/__tests__/__snapshots__/Nav.test.js.snap4
-rw-r--r--frontend/__tests__/__snapshots__/Order.test.js.snap2
3 files changed, 12 insertions, 6 deletions
diff --git a/frontend/__tests__/TakeMyMoney.test.js b/frontend/__tests__/TakeMyMoney.test.js
index b17de17..f2d0ca7 100644
--- a/frontend/__tests__/TakeMyMoney.test.js
+++ b/frontend/__tests__/TakeMyMoney.test.js
@@ -40,7 +40,9 @@ describe('<TakeMyMoney />', () => {
});
it('creates an order onToken', async () => {
- const createOrderSpy = jest.fn().mockResolvedValue({ data: { createOrder: { id: 'xyz789' } } });
+ const createOrderSpy = jest
+ .fn()
+ .mockResolvedValue({ data: { CREATE_ORDER_MUTATION: { id: 'xyz789' } } });
const wrapper = mount(
<MockedProvider mocks={mocks}>
@@ -64,7 +66,9 @@ describe('<TakeMyMoney />', () => {
wrapper.update();
NProgress.start = jest.fn();
- const createOrderSpy = jest.fn().mockResolvedValue({ data: { createOrder: { id: 'xyz789' } } });
+ const createOrderSpy = jest
+ .fn()
+ .mockResolvedValue({ data: { CREATE_ORDER_MUTATION: { id: 'xyz789' } } });
const component = wrapper.find('TakeMyMoney');
component.instance().onToken({ id: 'abc123' }, createOrderSpy);
wrapper.find('button').simulate('click');
@@ -83,7 +87,9 @@ describe('<TakeMyMoney />', () => {
// Spy on Router Push
Router.router.push = jest.fn();
- const createOrderSpy = jest.fn().mockResolvedValue({ data: { createOrder: { id: 'xyz789' } } });
+ const createOrderSpy = jest
+ .fn()
+ .mockResolvedValue({ data: { CREATE_ORDER_MUTATION: { id: 'xyz789' } } });
const component = wrapper.find('TakeMyMoney');
component.instance().onToken({ id: 'abc123' }, createOrderSpy);
diff --git a/frontend/__tests__/__snapshots__/Nav.test.js.snap b/frontend/__tests__/__snapshots__/Nav.test.js.snap
index f084308..8ac3ae4 100644
--- a/frontend/__tests__/__snapshots__/Nav.test.js.snap
+++ b/frontend/__tests__/__snapshots__/Nav.test.js.snap
@@ -16,10 +16,10 @@ exports[`<Nav></Nav> Renders minimal nav when logged out 1`] = `
</a>
</Link>
<Link
- href="/add"
+ href="/sell"
>
<a
- href="/add"
+ href="/sell"
onClick={[Function]}
>
Sell
diff --git a/frontend/__tests__/__snapshots__/Order.test.js.snap b/frontend/__tests__/__snapshots__/Order.test.js.snap
index cfdd4f6..8e76546 100644
--- a/frontend/__tests__/__snapshots__/Order.test.js.snap
+++ b/frontend/__tests__/__snapshots__/Order.test.js.snap
@@ -29,7 +29,7 @@ exports[`<Order/> Renders the order 1`] = `
Date
</span>
<span>
- March 31, 2018 8:00 PM
+ March 90, 2018 8:00 A
</span>
</p>
<p>