2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Use single quotes consistently.

This commit is contained in:
XhmikosR
2013-09-18 19:50:02 +03:00
parent ed63dfd8d3
commit eca8ff3803
30 changed files with 347 additions and 346 deletions
+17 -17
View File
@@ -1,23 +1,23 @@
$(function () {
module("dropdowns")
module('dropdowns')
test("should provide no conflict", function () {
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 () {
test('should be defined on jquery object', function () {
ok($(document.body).dropdown, 'dropdown method is defined')
})
test("should return element", function () {
var el = $("<div />")
test('should return element', function () {
var el = $('<div />')
ok(el.dropdown()[0] === el[0], 'same element returned')
})
test("should not open dropdown if target is disabled", function () {
test('should not open dropdown if target is disabled', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>'
@@ -34,7 +34,7 @@ $(function () {
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
})
test("should not open dropdown if target is disabled", function () {
test('should not open dropdown if target is disabled', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>'
@@ -51,7 +51,7 @@ $(function () {
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
})
test("should add class open to menu if clicked", function () {
test('should add class open to menu if clicked', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
@@ -68,7 +68,7 @@ $(function () {
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
})
test("should test if element has a # before assuming it's a selector", function () {
test('should test if element has a # before assuming it\'s a selector', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="/foo/" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
@@ -86,7 +86,7 @@ $(function () {
})
test("should remove open class if body clicked", function () {
test('should remove open class if body clicked', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
@@ -110,7 +110,7 @@ $(function () {
dropdown.remove()
})
test("should remove open class if body clicked, with multiple drop downs", function () {
test('should remove open class if body clicked, with multiple drop downs', function () {
var dropdownHTML =
'<ul class="nav">'
+ ' <li><a href="#menu1">Menu 1</a></li>'
@@ -132,24 +132,24 @@ $(function () {
, first = dropdowns.first()
, last = dropdowns.last()
ok(dropdowns.length == 2, "Should be two dropdowns")
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')
$('body').click()
ok($("#qunit-fixture .open").length === 0, 'open class removed')
ok($('#qunit-fixture .open').length === 0, 'open class removed')
last.click()
ok(last.parent('.open').length == 1, 'open class added on click')
ok($('#qunit-fixture .open').length == 1, 'only one object is open')
$('body').click()
ok($("#qunit-fixture .open").length === 0, 'open class removed')
ok($('#qunit-fixture .open').length === 0, 'open class removed')
$("#qunit-fixture").html("")
$('#qunit-fixture').html('')
})
test("should fire show and hide event", function () {
test('should fire show and hide event', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
@@ -183,7 +183,7 @@ $(function () {
})
test("should fire shown and hiden event", function () {
test('should fire shown and hiden event', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'