2019-10-07 17:11:53 -06:00
|
|
|
import React from 'react';
|
|
|
|
import { shallow, mount, render } from 'enzyme';
|
|
|
|
import EditMessageModal from '../../components/EditMessageModal';
|
|
|
|
import DbcUtils from '../../utils/dbc';
|
|
|
|
import DBC from '../../models/can/dbc';
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2019-10-07 17:11:53 -06:00
|
|
|
global.__JEST__ = 1;
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2019-10-07 17:11:53 -06:00
|
|
|
test('EditMessageModal successfully mounts with minimal default props', () => {
|
2017-12-12 19:27:20 -07:00
|
|
|
const dbc = new DBC();
|
|
|
|
const frame = dbc.createFrame(0);
|
2019-10-07 17:11:53 -06:00
|
|
|
const message = DbcUtils.createMessageSpec(dbc, 0, '0', 1);
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2017-12-12 19:27:20 -07:00
|
|
|
const component = shallow(
|
|
|
|
<EditMessageModal
|
|
|
|
handleClose={() => {}}
|
|
|
|
handleSave={() => {}}
|
|
|
|
message={message}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
expect(component.exists()).toBe(true);
|
2017-08-08 15:30:59 -06:00
|
|
|
});
|