aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/popover.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/popover.js')
-rw-r--r--js/tests/unit/popover.js38
1 files changed, 19 insertions, 19 deletions
diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js
index 767d79864..5ed4252be 100644
--- a/js/tests/unit/popover.js
+++ b/js/tests/unit/popover.js
@@ -1,24 +1,24 @@
$(function () {
- module("popover")
+ module('popover')
- test("should provide no conflict", function () {
+ test('should provide no conflict', function () {
var popover = $.fn.popover.noConflict()
ok(!$.fn.popover, 'popover was set back to undefined (org value)')
$.fn.popover = popover
})
- test("should be defined on jquery object", function () {
+ test('should be defined on jquery object', function () {
var div = $('<div></div>')
ok(div.popover, 'popover method is defined')
})
- test("should return element", function () {
+ test('should return element', function () {
var div = $('<div></div>')
ok(div.popover() == div, 'document.body returned')
})
- test("should render popover element", function () {
+ test('should render popover element', function () {
$.support.transition = false
var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>')
.appendTo('#qunit-fixture')
@@ -26,10 +26,10 @@ $(function () {
ok($('.popover').length, 'popover was inserted')
popover.popover('hide')
- ok(!$(".popover").length, 'popover removed')
+ ok(!$('.popover').length, 'popover removed')
})
- test("should store popover instance in popover data object", function () {
+ test('should store popover instance in popover data object', function () {
$.support.transition = false
var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>')
.popover()
@@ -37,7 +37,7 @@ $(function () {
ok(!!popover.data('bs.popover'), 'popover instance exists')
})
- test("should get title and content from options", function () {
+ test('should get title and content from options', function () {
$.support.transition = false
var popover = $('<a href="#">@fat</a>')
.appendTo('#qunit-fixture')
@@ -53,15 +53,15 @@ $(function () {
popover.popover('show')
ok($('.popover').length, 'popover was inserted')
- equals($('.popover .popover-title').text(), '@fat', 'title correctly inserted')
- equals($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted')
+ equal($('.popover .popover-title').text(), '@fat', 'title correctly inserted')
+ equal($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted')
popover.popover('hide')
ok(!$('.popover').length, 'popover was removed')
$('#qunit-fixture').empty()
})
- test("should get title and content from attributes", function () {
+ test('should get title and content from attributes', function () {
$.support.transition = false
var popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>')
.appendTo('#qunit-fixture')
@@ -69,8 +69,8 @@ $(function () {
.popover('show')
ok($('.popover').length, 'popover was inserted')
- equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
- equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted')
+ equal($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
+ equal($('.popover .popover-content').text(), 'loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻', 'content correctly inserted')
popover.popover('hide')
ok(!$('.popover').length, 'popover was removed')
@@ -78,7 +78,7 @@ $(function () {
})
- test("should get title and content from attributes #2", function () {
+ test('should get title and content from attributes #2', function () {
$.support.transition = false
var popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>')
.appendTo('#qunit-fixture')
@@ -89,15 +89,15 @@ $(function () {
.popover('show')
ok($('.popover').length, 'popover was inserted')
- equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
- equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted')
+ equal($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
+ equal($('.popover .popover-content').text(), 'loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻', 'content correctly inserted')
popover.popover('hide')
ok(!$('.popover').length, 'popover was removed')
$('#qunit-fixture').empty()
})
- test("should respect custom classes", function() {
+ test('should respect custom classes', function () {
$.support.transition = false
var popover = $('<a href="#">@fat</a>')
.appendTo('#qunit-fixture')
@@ -117,8 +117,8 @@ $(function () {
$('#qunit-fixture').empty()
})
- test("should destroy popover", function () {
- var popover = $('<div/>').popover({trigger: 'hover'}).on('click.foo', function(){})
+ test('should destroy popover', function () {
+ var popover = $('<div/>').popover({trigger: 'hover'}).on('click.foo', function () {})
ok(popover.data('bs.popover'), 'popover has data')
ok($._data(popover[0], 'events').mouseover && $._data(popover[0], 'events').mouseout, 'popover has hover event')
ok($._data(popover[0], 'events').click[0].namespace == 'foo', 'popover has extra click.foo event')