diff options
| author | Johann-S <[email protected]> | 2018-06-07 21:43:04 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-02-20 22:05:45 +0200 |
| commit | 2b780787797da2bed2af0f95963be61e2b8e94a4 (patch) | |
| tree | c5efa177458d3a64b4a072137b6c171ac65bfcfd /js/tests/unit/carousel.js | |
| parent | 7eddee286eb76da4d057a59706e4c512206dab45 (diff) | |
| download | bootstrap-2b780787797da2bed2af0f95963be61e2b8e94a4.tar.xz bootstrap-2b780787797da2bed2af0f95963be61e2b8e94a4.zip | |
fix(data): do not use data object in our unit tests
Diffstat (limited to 'js/tests/unit/carousel.js')
| -rw-r--r-- | js/tests/unit/carousel.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index fd9cf8509..f89dfcf96 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -475,26 +475,26 @@ $(function () { $carousel.appendTo('body') EventHandler.trigger($('[data-slide]').first()[0], 'click') - assert.strictEqual(Data.getData($carousel[0], 'bs.carousel')._config.interval, 1814) + assert.strictEqual(Carousel._getInstance($carousel[0])._config.interval, 1814) $carousel.remove() $carousel.appendTo('body').attr('data-modal', 'foobar') EventHandler.trigger($('[data-slide]').first()[0], 'click') - assert.strictEqual(Data.getData($carousel[0], 'bs.carousel')._config.interval, 1814, 'even if there is an data-modal attribute set') + assert.strictEqual(Carousel._getInstance($carousel[0])._config.interval, 1814, 'even if there is an data-modal attribute set') $carousel.remove() $carousel.appendTo('body') EventHandler.trigger($('[data-slide]').first()[0], 'click') $carousel.attr('data-interval', 1860) EventHandler.trigger($('[data-slide]').first()[0], 'click') - assert.strictEqual(Data.getData($carousel[0], 'bs.carousel')._config.interval, 1814, 'attributes should be read only on initialization') + assert.strictEqual(Carousel._getInstance($carousel[0])._config.interval, 1814, 'attributes should be read only on initialization') $carousel.bootstrapCarousel('dispose') $carousel.remove() $carousel.attr('data-interval', false) $carousel.appendTo('body') $carousel.bootstrapCarousel(1) - assert.strictEqual(Data.getData($carousel[0], 'bs.carousel')._config.interval, false, 'data attribute has higher priority than default options') + assert.strictEqual(Carousel._getInstance($carousel[0])._config.interval, false, 'data attribute has higher priority than default options') $carousel.remove() }) |
