From 3b6ba7a9b2757e8159a6b237f14546a44184aab3 Mon Sep 17 00:00:00 2001 From: Arno Fortelny Date: Thu, 5 Mar 2015 13:24:03 -0500 Subject: [PATCH] [fixed] Col Offset/Pull/Push of zero. Fixes #406 --- test/ColSpec.jsx | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 test/ColSpec.jsx 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/)); + }); +});