Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/bootstrap-dropdown.js')
-rw-r--r--js/tests/unit/bootstrap-dropdown.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/tests/unit/bootstrap-dropdown.js b/js/tests/unit/bootstrap-dropdown.js
index 3788209ecc..2f0d2d29ec 100644
--- a/js/tests/unit/bootstrap-dropdown.js
+++ b/js/tests/unit/bootstrap-dropdown.js
@@ -2,6 +2,12 @@ $(function () {
module("bootstrap-dropdowns")
+ test("should provide no conflict", function () {
+ var dropdown = $.fn.dropdown.noConflict()
+ ok(!$.fn.dropdown, 'dropdown was set back to undefined (org value)')
+ $.fn.dropdown = dropdown
+ })
+
test("should be defined on jquery object", function () {
ok($(document.body).dropdown, 'dropdown method is defined')
})
@@ -104,7 +110,7 @@ $(function () {
})
test("should remove open class if body clicked, with multiple drop downs", function () {
- var dropdownHTML =
+ var dropdownHTML =
'<ul class="nav">'
+ ' <li><a href="#menu1">Menu 1</a></li>'
+ ' <li class="dropdown" id="testmenu">'
@@ -126,7 +132,7 @@ $(function () {
, last = dropdowns.last()
ok(dropdowns.length == 2, "Should be two dropdowns")
-
+
first.click()
ok(first.parents('.open').length == 1, 'open class added on click')
ok($('#qunit-fixture .open').length == 1, 'only one object is open')