Skip to content

Commit

Permalink
update textarea test
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Oct 27, 2015
1 parent da38548 commit 335554c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/specs/addons/Textarea-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ describe('Textarea', () => {
it('has a default value', () => {
render(<Textarea defaultValue='Hello World' />)
.findTag('textarea')
.getDOMNode()
.value.should.equal('Hello World');
});
it('has a name assigned', () => {
const renderedTextarea = render(<Textarea name='sample-post' />);
expect(renderedTextarea.first().props.name).to.equal('sample-post');
render(<Textarea name='sample-post' />)
.first()
.props.name.should.equal('sample-post');
});
it('has assigned amount of rows', () => {
const renderedTextarea = render(<Textarea rows='6' />);
expect(renderedTextarea.findTag('textarea').props.rows).to.equal('6');
render(<Textarea rows='6' />)
.findTag('textarea')
.getAttribute('rows')
.should.equal('6');
});
});

0 comments on commit 335554c

Please sign in to comment.