Fix ORganizationTeams test

This commit is contained in:
John Mitchell
2019-04-22 16:33:12 -04:00
parent 6f789b661f
commit 986641de9f

View File

@@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import { Router } from 'react-router-dom';
import { createMemoryHistory } from 'history'; import { createMemoryHistory } from 'history';
import { mountWithContexts } from '../../../../enzymeHelpers'; import { mountWithContexts } from '../../../../enzymeHelpers';
import { sleep } from '../../../../testUtils'; import { sleep } from '../../../../testUtils';
@@ -92,12 +93,18 @@ describe('<OrganizationTeams />', () => {
initialEntries: ['/organizations/1/teams'], initialEntries: ['/organizations/1/teams'],
}); });
const wrapper = mountWithContexts( const wrapper = mountWithContexts(
<OrganizationTeams <Router history={history}>
id={1} <OrganizationTeams
searchString="" id={1}
/>, { context: { searchString=""
network: { api: { readOrganizationTeamsList }, handleHttpError: () => {} }, />
router: { history } </Router>,
{ context: {
network: {
api: { readOrganizationTeamsList },
handleHttpError: () => {}
},
router: false,
} } } }
); );