Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Commit

Permalink
check dc rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Lavigne committed Jan 17, 2017
1 parent 1e38e89 commit 0ad8f25
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/routes/Dashboard/components/Map/PopUpCard/PopUpCard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,36 @@ test('(Component) Renders with expected elements', t => {
const component = shallow(<PopUpCard {...props} />);
t.true(component.is('div'), 'is wrapped by a div');
});

const propsForDc = {
dashboard: {
infoBox: {
type: 'distributionCenter',
data: {
id: 1,
},
},
shipments: [],
retailers: [],
'distribution-centers': [
{
contact: {
name: 'Joseph Smith',
},
id: 1,
address: {
state: 'Utah',
city: 'Salt Lake City',
country: 'US',
latitude: 40.71,
longitude: -111.9,
},
},
],
},
selectMarker: () => {},
};
test('(Component) Renders a DC card', t => {
const component = shallow(<PopUpCard {...propsForDc} />);
t.is(component.find('DCCard').length, 1, 'has a DC Card');
});

0 comments on commit 0ad8f25

Please sign in to comment.