From 29e0cb4b91b3800ef4974c54b8473e6e4fb28e16 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Mon, 13 Mar 2017 21:48:32 +0000 Subject: Organize our polyfills and standardize on core-js --- spec/javascripts/bootstrap_jquery_spec.js | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 spec/javascripts/bootstrap_jquery_spec.js (limited to 'spec/javascripts/bootstrap_jquery_spec.js') diff --git a/spec/javascripts/bootstrap_jquery_spec.js b/spec/javascripts/bootstrap_jquery_spec.js new file mode 100644 index 00000000000..48994b7c523 --- /dev/null +++ b/spec/javascripts/bootstrap_jquery_spec.js @@ -0,0 +1,42 @@ +/* eslint-disable space-before-function-paren, no-var */ + +import '~/commons/bootstrap'; + +(function() { + describe('Bootstrap jQuery extensions', function() { + describe('disable', function() { + beforeEach(function() { + return setFixtures(''); + }); + it('adds the disabled attribute', function() { + var $input; + $input = $('input').first(); + $input.disable(); + return expect($input).toHaveAttr('disabled', 'disabled'); + }); + return it('adds the disabled class', function() { + var $input; + $input = $('input').first(); + $input.disable(); + return expect($input).toHaveClass('disabled'); + }); + }); + return describe('enable', function() { + beforeEach(function() { + return setFixtures(''); + }); + it('removes the disabled attribute', function() { + var $input; + $input = $('input').first(); + $input.enable(); + return expect($input).not.toHaveAttr('disabled'); + }); + return it('removes the disabled class', function() { + var $input; + $input = $('input').first(); + $input.enable(); + return expect($input).not.toHaveClass('disabled'); + }); + }); + }); +}).call(window); -- cgit v1.2.1