Skip to content

Commit

Permalink
update field test
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Oct 27, 2015
1 parent 335554c commit d18ae55
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/specs/collections/Form/Field-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@ describe('Field', () => {
it('has a label', () => {
render(<Field label='First Name' />)
.findTag('label')
.props.children.should.equal('First Name');
.textContent.should.equal('First Name');
});

it('renders children', () => {
render(<Field label='First Name'>yo child</Field>)
.assertText('yo child');
render(<Field>yo child</Field>).assertText('yo child');
});

it('can specify a width', () => {
_.each(_.range(1, 17), n => {
const classes = numberToWord(n) + ' wide';
render(<Field width={n} />).findClass(classes);
render(<Field width={n} />).findClass(`${numberToWord(n)} wide`);
});
});
});

0 comments on commit d18ae55

Please sign in to comment.