aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/button.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-06-07 21:43:04 +0200
committerXhmikosR <[email protected]>2019-02-20 22:05:45 +0200
commit2b780787797da2bed2af0f95963be61e2b8e94a4 (patch)
treec5efa177458d3a64b4a072137b6c171ac65bfcfd /js/tests/unit/button.js
parent7eddee286eb76da4d057a59706e4c512206dab45 (diff)
downloadbootstrap-2b780787797da2bed2af0f95963be61e2b8e94a4.tar.xz
bootstrap-2b780787797da2bed2af0f95963be61e2b8e94a4.zip
fix(data): do not use data object in our unit tests
Diffstat (limited to 'js/tests/unit/button.js')
-rw-r--r--js/tests/unit/button.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js
index 0fa19d154..50b531f6f 100644
--- a/js/tests/unit/button.js
+++ b/js/tests/unit/button.js
@@ -1,6 +1,8 @@
$(function () {
'use strict'
+ var Button = typeof window.bootstrap !== 'undefined' ? window.bootstrap.Button : window.Button
+
QUnit.module('button plugin')
QUnit.test('should be defined on jquery object', function (assert) {
@@ -208,11 +210,11 @@ $(function () {
var $el = $('<div/>')
var $button = $el.bootstrapButton()
- assert.ok(typeof Data.getData($button[0], 'bs.button') !== 'undefined')
+ assert.ok(typeof Button._getInstance($button[0]) !== 'undefined')
- Data.getData($button[0], 'bs.button').dispose()
+ Button._getInstance($button[0]).dispose()
- assert.ok(Data.getData($button[0], 'bs.button') === null)
+ assert.ok(Button._getInstance($button[0]) === null)
})
QUnit.test('should return button version', function (assert) {