-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWellSpec.js
30 lines (26 loc) · 881 Bytes
/
WellSpec.js
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
28
29
30
import React from 'react';
import ReactDOM from 'react-dom';
import ReactTestUtils from 'react-dom/test-utils';
import Well from '../src/Well';
describe('Well', () => {
it('Should output a well with content', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Well>
<strong>Content</strong>
</Well>
);
assert.ok(
ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'strong')
);
});
it('Should have a well class', () => {
let instance = ReactTestUtils.renderIntoDocument(<Well>Content</Well>);
assert.ok(ReactDOM.findDOMNode(instance).className.match(/\bwell\b/));
});
it('Should accept bsSize arguments', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Well bsSize="small">Content</Well>
);
assert.ok(ReactDOM.findDOMNode(instance).className.match(/\bwell-sm\b/));
});
});