Sha256: 2b3238e628e8169e53e755f54759f6778bac5a7960bbc41003a5d6cfd73a415b
Contents?: true
Size: 1.4 KB
Versions: 158
Compression:
Stored size: 1.4 KB
Contents
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import SubscriptionDetails from '../SubscriptionDetails'; import SubscriptionDetailAssociations from '../SubscriptionDetailAssociations'; import SubscriptionDetailInfo from '../SubscriptionDetailInfo'; import SubscriptionDetailProducts from '../SubscriptionDetailProducts'; import SubscriptionDetailProductContent from '../SubscriptionDetailProductContent'; import { loadSubscriptionDetails } from '../SubscriptionDetailActions'; import { loadProducts } from '../../../Products/ProductActions'; import { successState } from './subscriptionDetails.fixtures'; describe('subscriptions details page', () => { it('should render and contain appropiate components', async () => { const match = { params: { id: '1' } }; const noop = () => {}; const wrapper = shallow(<SubscriptionDetails loadSubscriptionDetails={loadSubscriptionDetails} loadProducts={loadProducts} subscriptionDetails={successState} history={{ push: noop }} match={match} />); expect(wrapper.find(SubscriptionDetailAssociations)).toHaveLength(1); expect(wrapper.find(SubscriptionDetailInfo)).toHaveLength(1); expect(wrapper.find(SubscriptionDetailProducts)).toHaveLength(1); expect(wrapper.find(SubscriptionDetailProductContent)).toHaveLength(1); expect(toJson(wrapper)).toMatchSnapshot(); }); });
Version data entries
158 entries across 158 versions & 1 rubygems