diff --git a/test/ColSpec.jsx b/test/ColSpec.jsx new file mode 100644 index 0000000000..c177f78fac --- /dev/null +++ b/test/ColSpec.jsx @@ -0,0 +1,43 @@ +/*global describe, it, assert */ + +var React = require('react'); +var ReactTestUtils = require('react/lib/ReactTestUtils'); +var Col = require('../lib/Col'); + +describe('Col', function () { + it('Should set Offset of zero', function () { + var instance = ReactTestUtils.renderIntoDocument( + + ); + + var instanceClassName = instance.getDOMNode().className; + assert.ok(instanceClassName.match(/\bcol-xs-offset-0\b/)); + assert.ok(instanceClassName.match(/\bcol-sm-offset-0\b/)); + assert.ok(instanceClassName.match(/\bcol-md-offset-0\b/)); + assert.ok(instanceClassName.match(/\bcol-lg-offset-0\b/)); + }); + + it('Should set Pull of zero', function () { + var instance = ReactTestUtils.renderIntoDocument( + + ); + + var instanceClassName = instance.getDOMNode().className; + assert.ok(instanceClassName.match(/\bcol-xs-pull-0\b/)); + assert.ok(instanceClassName.match(/\bcol-sm-pull-0\b/)); + assert.ok(instanceClassName.match(/\bcol-md-pull-0\b/)); + assert.ok(instanceClassName.match(/\bcol-lg-pull-0\b/)); + }); + + it('Should set Push of zero', function () { + var instance = ReactTestUtils.renderIntoDocument( + + ); + + var instanceClassName = instance.getDOMNode().className; + assert.ok(instanceClassName.match(/\bcol-xs-push-0\b/)); + assert.ok(instanceClassName.match(/\bcol-sm-push-0\b/)); + assert.ok(instanceClassName.match(/\bcol-md-push-0\b/)); + assert.ok(instanceClassName.match(/\bcol-lg-push-0\b/)); + }); +});