From 2b780787797da2bed2af0f95963be61e2b8e94a4 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Thu, 7 Jun 2018 21:43:04 +0200 Subject: fix(data): do not use data object in our unit tests --- js/tests/unit/button.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'js/tests/unit/button.js') 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 = $('
') 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) { -- cgit v1.2.3