2020-01-22 17:47:09 +01:00
|
|
|
import React from 'react';
|
|
|
|
import renderer from 'react-test-renderer';
|
|
|
|
import { IntlProvider } from 'react-intl';
|
|
|
|
|
|
|
|
import TriggerContainer from '../index';
|
|
|
|
|
|
|
|
describe('<TriggerContainer />', () => {
|
|
|
|
const props = {
|
|
|
|
isPending: false,
|
|
|
|
onCancel: jest.fn(),
|
|
|
|
response: {
|
|
|
|
statusCode: 200,
|
|
|
|
message: 'success',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-01-29 19:27:26 +01:00
|
|
|
it('should match the snapshot', () => {
|
2020-01-22 17:47:09 +01:00
|
|
|
const tree = renderer.create(
|
|
|
|
<IntlProvider locale="en">
|
|
|
|
<TriggerContainer {...props} />
|
|
|
|
</IntlProvider>
|
|
|
|
);
|
2020-01-29 17:44:51 +01:00
|
|
|
|
2020-01-22 17:47:09 +01:00
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|