Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mgreiling@gitlab.com>2017-03-14 00:48:32 +0300
committerAlfredo Sumaran <alfredo@gitlab.com>2017-03-14 00:48:32 +0300
commit29e0cb4b91b3800ef4974c54b8473e6e4fb28e16 (patch)
tree3b0f9d9e221755caa71be35a34f2fbc9072ebf0e /spec/javascripts/bootstrap_jquery_spec.js
parent88206d67c38e87685bbacc14cfd60ee9dc42ac7f (diff)
Organize our polyfills and standardize on core-js
Diffstat (limited to 'spec/javascripts/bootstrap_jquery_spec.js')
-rw-r--r--spec/javascripts/bootstrap_jquery_spec.js42
1 files changed, 42 insertions, 0 deletions
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('<input type="text" />');
+ });
+ 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('<input type="text" disabled="disabled" class="disabled" />');
+ });
+ 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);