From 8cf04911db36b1ad5f4a98db51b44050c78df18a Mon Sep 17 00:00:00 2001 From: fat Date: Wed, 17 Jul 2013 23:25:26 -0700 Subject: fixes #7776 --- js/tests/unit/popover.js | 20 ++++++++++++++++++++ js/tests/unit/tooltip.js | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'js/tests') diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index fb0017567..767d79864 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -77,6 +77,26 @@ $(function () { $('#qunit-fixture').empty() }) + + test("should get title and content from attributes #2", function () { + $.support.transition = false + var popover = $('@mdo') + .appendTo('#qunit-fixture') + .popover({ + title: 'ignored title option', + content: 'ignored content option' + }) + .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') + + popover.popover('hide') + ok(!$('.popover').length, 'popover was removed') + $('#qunit-fixture').empty() + }) + test("should respect custom classes", function() { $.support.transition = false var popover = $('@fat') diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index b2b004d6e..610505588 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -296,7 +296,7 @@ $(function () { $("head").append('') var container = $("
").appendTo("body") - , target = $('To my right') + , target = $('') .appendTo(container) .tooltip({placement: 'right'}) .tooltip('show') -- cgit v1.2.3