TopbarDesktop.test: remove routeConfiguration and RoutesProvider

This commit is contained in:
Vesa Luusua 2017-10-10 20:14:22 +03:00
parent 399ec5f3e7
commit a601974407

View file

@ -1,9 +1,6 @@
import React from 'react';
import { fakeIntl } from '../../util/test-data';
import { renderDeep } from '../../util/test-helpers';
import { RoutesProvider } from '../../components';
import routeConfiguration from '../../routeConfiguration';
import { flattenRoutes } from '../../util/routes';
import TopbarDesktop from './TopbarDesktop';
const noop = () => null;
@ -11,7 +8,6 @@ const noop = () => null;
describe('TopbarDesktop', () => {
it('data matches snapshot', () => {
window.google = { maps: {} };
const flattenedRoutes = flattenRoutes(routeConfiguration());
const topbarProps = {
isAuthenticated: true,
currentUserHasListings: true,
@ -20,11 +16,7 @@ describe('TopbarDesktop', () => {
intl: fakeIntl,
onLogout: noop,
};
const tree = renderDeep(
<RoutesProvider flattenedRoutes={flattenedRoutes}>
<TopbarDesktop {...topbarProps} />
</RoutesProvider>
);
const tree = renderDeep(<TopbarDesktop {...topbarProps} />);
delete window.google;
expect(tree).toMatchSnapshot();
});