From 48a8dd2a23f11981d42785db4091c029b5b7e781 Mon Sep 17 00:00:00 2001 From: Kevin Attfield Date: Mon, 8 Oct 2012 22:29:44 -0700 Subject: Added test to fix for #5362 --- js/tests/unit/bootstrap-tab.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'js') diff --git a/js/tests/unit/bootstrap-tab.js b/js/tests/unit/bootstrap-tab.js index 9878047810..40f9a7406d 100644 --- a/js/tests/unit/bootstrap-tab.js +++ b/js/tests/unit/bootstrap-tab.js @@ -58,4 +58,23 @@ $(function () { .tab('show') }) + test("show and shown events should reference correct relatedTarget", function () { + var dropHTML = + '' + + $(dropHTML).find('ul>li:first a').tab('show').end() + .find('ul>li:last a').on('show', function(event){ + equals(event.relatedTarget.hash, "#1-1") + }).on('shown', function(event){ + equals(event.relatedTarget.hash, "#1-1") + }).tab('show') + }) + }) \ No newline at end of file -- cgit v1.2.3