Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jun 14, 2016
1 parent 719429c commit b9039ce
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/Select.spec.js
Expand Up @@ -104,7 +104,7 @@ describe('Select', () => {

it('should have clear button', () => {
instance = ReactDOM.render(
<Select allowClear>
<Select value="1" allowClear>
<Option value="1">1</Option>
<Option value="2">2</Option>
</Select>,
Expand All @@ -113,6 +113,17 @@ describe('Select', () => {
'rc-select-selection__clear').length).to.be(1);
});

it('should not have clear button', () => {
instance = ReactDOM.render(
<Select allowClear>
<Option value="1">1</Option>
<Option value="2">2</Option>
</Select>,
div);
expect(TestUtils.scryRenderedDOMComponentsWithClass(instance,
'rc-select-selection__clear').length).to.be(0);
});

it('should not response click event when select is disabled', (done) => {
instance = ReactDOM.render(
<Select disabled defaultValue="2">
Expand Down

0 comments on commit b9039ce

Please sign in to comment.