Sha256: b31591e50376b800fb4ac2738d3d34d75018248aa90c781e101a9cf6df9e5fcd
Contents?: true
Size: 1.02 KB
Versions: 160
Compression:
Stored size: 1.02 KB
Contents
import React from 'react'; import thunk from 'redux-thunk'; import configureMockStore from 'redux-mock-store'; import { mount } from 'enzyme'; import toJson from 'enzyme-to-json'; import withOrganization from './withOrganization'; jest.mock('../SelectOrg/SetOrganization'); const mockStore = configureMockStore([thunk]); const store = mockStore({ katello: { organization: {} } }); describe('subscriptions page', () => { const WrappedComponent = () => <div> Wrapped! </div>; it('should render the wrapped component', () => { global.document.getElementById = () => ({ dataset: { id: 1 } }); const Component = withOrganization(WrappedComponent); const page = mount(<Component store={store} />); expect(toJson(page)).toMatchSnapshot(); }); it('should render select org page', () => { global.document.getElementById = () => ({ dataset: { id: '' } }); const Component = withOrganization(WrappedComponent); const page = mount(<Component store={store} />); expect(toJson(page)).toMatchSnapshot(); }); });
Version data entries
160 entries across 160 versions & 1 rubygems