Update tests

This commit is contained in:
Vesa Luusua 2017-09-14 21:21:53 +03:00
parent 15e4521798
commit 96b1ddaaec

View file

@ -52,7 +52,7 @@ describe('ListingPage', () => {
return showListing(id)(dispatch, null, sdk).then(data => {
expect(data).toEqual(response);
expect(show.mock.calls).toEqual([[{ id, include: ['author', 'images'] }]]);
expect(show.mock.calls).toEqual([[{ id, include: ['author', 'author.profileImage', 'images'] }]]);
expect(dispatch.mock.calls).toEqual([
[showListingRequest(id)],
[expect.anything()], // fetchCurrentUser() call
@ -76,7 +76,7 @@ describe('ListingPage', () => {
},
e => {
expect(e).toEqual(error);
expect(show.mock.calls).toEqual([[{ id, include: ['author', 'images'] }]]);
expect(show.mock.calls).toEqual([[{ id, include: ['author', 'author.profileImage', 'images'] }]]);
expect(dispatch.mock.calls).toEqual([
[showListingRequest(id)],
[expect.anything()], // fetchCurrentUser() call