2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

fix(data): do not use data object in our unit tests

This commit is contained in:
Johann-S
2018-06-07 21:43:04 +02:00
committed by XhmikosR
parent 7eddee286e
commit 2b78078779
21 changed files with 190 additions and 44 deletions
+5 -3
View File
@@ -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) {