Skip to content

Commit

Permalink
fix(sorting): Integrated with new signs implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel James authored and thzinc committed Mar 24, 2017
1 parent fb5994c commit dfa15a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ export const signs = {
toBlob(signs.list),
{
headers: {
Link: '</1/SYNC/signs?page=1&perPage=10&q=first>; rel="next", </1/SYNC/signs?page=1&perPage=10&q=first>; rel="last"',
Link: '</1/SYNC/signs?page=1&perPage=10&q=first&sort=>; rel="next", </1/SYNC/signs?page=1&perPage=10&q=first&sort=>; rel="last"',
},
});
const singleResponse = () => new Response(toBlob(signs.getById(1)));

fetchMock
.get(client.resolve('/1/SYNC/signs?page=1&perPage=10&q=first'), listResponse)
.get(client.resolve('/1/SYNC/signs?page=1&perPage=10&q=first&sort='), listResponse)
.get(client.resolve('/1/SYNC/signs/1'), singleResponse);
},
getById: id => signs.list.find(v => v.id === id),
Expand Down
2 changes: 1 addition & 1 deletion src/resources/SignsContext.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('When building a query for signs', () => {
client.setAuthenticated();

beforeEach(() => fetchMock
.get(client.resolve('/1/SYNC/signs?page=9&perPage=27&q=valid'), mockSigns.list)
.get(client.resolve('/1/SYNC/signs?page=9&perPage=27&q=valid&sort='), mockSigns.list)
.catch(503));
afterEach(fetchMock.restore);

Expand Down

0 comments on commit dfa15a6

Please sign in to comment.