@@ -40,7 +40,7 @@ describe('Input', function () {
4040 assert . equal ( instance . getValue ( ) , 'v' ) ;
4141 } ) ;
4242
43- it . skip ( 'renders a submit button element when type=submit' , function ( ) {
43+ it ( 'renders a submit button element when type=submit' , function ( ) {
4444 let instance = ReactTestUtils . renderIntoDocument (
4545 < Input type = "submit" bsStyle = "danger" wrapperClassName = 'test' />
4646 ) ;
@@ -50,6 +50,24 @@ describe('Input', function () {
5050 assert . equal ( node . getAttribute ( 'class' ) , 'btn btn-danger' ) ;
5151 } ) ;
5252
53+ it ( 'must not throw warning when bsStyle=danger and type=submit' , function ( ) {
54+ ReactTestUtils . renderIntoDocument (
55+ < Input type = "submit" bsStyle = "danger" />
56+ ) ;
57+
58+ console . warn . called . should . be . false ;
59+ } ) ;
60+
61+ it ( 'throws warning about wrong type for bsStyle=error when type=submit' , function ( ) {
62+ ReactTestUtils . renderIntoDocument (
63+ < Input type = "submit" bsStyle = "error" />
64+ ) ;
65+
66+ console . warn . called . should . be . true ;
67+ console . warn . calledWithMatch ( 'propType: Invalid' ) . should . be . true ;
68+ console . warn . reset ( ) ; // reset state for afterEach()
69+ } ) ;
70+
5371 it ( 'renders a p element when type=static' , function ( ) {
5472 let instance = ReactTestUtils . renderIntoDocument (
5573 < Input type = "static" value = "v" />
0 commit comments