From 459ab0cba8ed3bbfcdb832ea09eafdc1db8d74d3 Mon Sep 17 00:00:00 2001 From: Andrew Kiernan Date: Sun, 16 Aug 2015 20:24:40 -0400 Subject: [PATCH] [added] #460 ListGroupItem outputs ); }, diff --git a/test/ListGroupItemSpec.js b/test/ListGroupItemSpec.js index b67c8270a2..f4ba9c0aaf 100644 --- a/test/ListGroupItemSpec.js +++ b/test/ListGroupItemSpec.js @@ -20,6 +20,15 @@ describe('ListGroupItem', function () { assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); + it('Should output a "button" if an "onClick" handler is set', function () { + let noop = function () {}; + let instance = ReactTestUtils.renderIntoDocument( + Button + ); + assert.equal(React.findDOMNode(instance).nodeName, 'BUTTON'); + assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); + }); + it('Should output an "li" if "listItem" prop is set', function () { let instance = ReactTestUtils.renderIntoDocument( Item 1 diff --git a/test/ListGroupSpec.js b/test/ListGroupSpec.js index cc0684f834..e0503acbdf 100644 --- a/test/ListGroupSpec.js +++ b/test/ListGroupSpec.js @@ -131,7 +131,7 @@ describe('ListGroup', function () { ); assert.equal(React.findDOMNode(instance).nodeName, 'DIV'); - assert.equal(React.findDOMNode(instance).firstChild.nodeName, 'A'); + assert.equal(React.findDOMNode(instance).firstChild.nodeName, 'BUTTON'); assert.equal(React.findDOMNode(instance).lastChild.nodeName, 'SPAN'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group')); });