forked from reactstrap/reactstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModalBody.spec.js
More file actions
27 lines (21 loc) · 832 Bytes
/
Copy pathModalBody.spec.js
File metadata and controls
27 lines (21 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react';
import { shallow } from 'enzyme';
import { ModalBody } from '../';
describe('ModalBody', () => {
it('should render with "modal-body" class', () => {
const wrapper = shallow(<ModalBody>Yo!</ModalBody>);
expect(wrapper.text()).toBe('Yo!');
expect(wrapper.hasClass('modal-body')).toBe(true);
});
it('should render additional classes', () => {
const wrapper = shallow(<ModalBody className="other">Yo!</ModalBody>);
expect(wrapper.hasClass('other')).toBe(true);
expect(wrapper.hasClass('modal-body')).toBe(true);
});
it('should render custom tag', () => {
const wrapper = shallow(<ModalBody tag="main">Yo!</ModalBody>);
expect(wrapper.text()).toBe('Yo!');
expect(wrapper.hasClass('modal-body')).toBe(true);
expect(wrapper.type()).toBe('main');
});
});