summaryrefslogtreecommitdiffstats
path: root/frontend/__tests__/Pagination.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/__tests__/Pagination.test.js')
-rw-r--r--frontend/__tests__/Pagination.test.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/frontend/__tests__/Pagination.test.js b/frontend/__tests__/Pagination.test.js
index 1202d9a..29a57f9 100644
--- a/frontend/__tests__/Pagination.test.js
+++ b/frontend/__tests__/Pagination.test.js
@@ -1,11 +1,10 @@
import React from 'react';
import { shallow, mount } from 'enzyme';
import toJSON from 'enzyme-to-json';
-import Pagination from '../components/Pagination';
+import Pagination, { PAGINATION_QUERY } from '../components/Pagination';
import { MockedProvider } from 'react-apollo/test-utils';
import wait from 'waait';
import { fakeItem } from '../lib/testUtils';
-import { ALL_ITEMS_QUERY } from '../queries/queries.graphql';
import Router from 'next/router';
@@ -15,7 +14,7 @@ Router.router = { push() {}, prefetch() {} };
function makeMocksFor(length) {
return [
{
- request: { query: ALL_ITEMS_QUERY, variables: { skip: 0, first: 4 } },
+ request: { query: PAGINATION_QUERY, variables: { skip: 0, first: 4 } },
result: {
data: {
itemsConnection: {
@@ -25,7 +24,6 @@ function makeMocksFor(length) {
__typename: 'count',
},
},
- items: Array.from({ length }, (_, i) => fakeItem({ id: `item${i}` })),
},
},
},