From: Heinrich Fenkart Date: Wed, 18 Jun 2014 19:34:21 +0000 (+0200) Subject: Clean modal unit tests up X-Git-Tag: v3.3.0~379^2~2^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=998c3724e80f7687eed747104e91b8ed773a3d54;p=thirdparty%2Fbootstrap.git Clean modal unit tests up --- diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 7a0660ea20..6c48ed44b4 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -4,8 +4,7 @@ $(function () { module('modal plugin') test('should be defined on jquery object', function () { - var div = $('') - ok(div.modal, 'modal method is defined') + ok($(document.body).modal, 'modal method is defined') }) module('modal', { @@ -20,13 +19,14 @@ $(function () { }) test('should provide no conflict', function () { - ok(!$.fn.modal, 'modal was set back to undefined (orig value)') + strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)') }) - test('should return element', function () { - var div = $('') - ok(div.bootstrapModal() == div, 'document.body returned') - $('#modal-test').remove() + test('should return jquery collection containing the element', function () { + var $el = $('