import React from 'react';
import TestUtils from 'react-addons-test-utils';
import RangeInput from '../../index';

describe('react-range-input', function() {
  it('renders and html5 input with type range', function() {
    const component = TestUtils.renderIntoDocument(
      <RangeInput labelText="Opacity" defaultValue={25} name="opacity" max={100} min={0} />
    );

    const input = TestUtils.findRenderedDOMComponentWithTag(component, 'input');

    expect(input.type).to.equal('range');
  });
});

@@ -494,12 +494,378 @@
 ;%0A  %7D);%0A
+  it('renders an output element that contains the default value', function() %7B%0A    const component = TestUtils.renderIntoDocument(%0A      %3CRangeInput labelText=%22Opacity%22 defaultValue=%7B25%7D name=%22opacity%22 max=%7B100%7D min=%7B0%7D /%3E%0A    );%0A%0A    const output = TestUtils.findRenderedDOMComponentWithTag(component, 'output');%0A%0A    expect(output.innerText).to.equal('25');%0A  %7D);%0A
 %7D);%0A

Add a new test case