From 4642156cbc6da4a9e25dce2168f2fb9b726de042 Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Tue, 6 Aug 2013 15:19:12 -0400 Subject: unignore bower_components --- .../bootstrap/js/tests/unit/scrollspy.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 bower_components/bootstrap/js/tests/unit/scrollspy.js (limited to 'bower_components/bootstrap/js/tests/unit/scrollspy.js') diff --git a/bower_components/bootstrap/js/tests/unit/scrollspy.js b/bower_components/bootstrap/js/tests/unit/scrollspy.js new file mode 100644 index 00000000..06219a1c --- /dev/null +++ b/bower_components/bootstrap/js/tests/unit/scrollspy.js @@ -0,0 +1,37 @@ +$(function () { + + module("scrollspy") + + test("should provide no conflict", function () { + var scrollspy = $.fn.scrollspy.noConflict() + ok(!$.fn.scrollspy, 'scrollspy was set back to undefined (org value)') + $.fn.scrollspy = scrollspy + }) + + test("should be defined on jquery object", function () { + ok($(document.body).scrollspy, 'scrollspy method is defined') + }) + + test("should return element", function () { + ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') + }) + + test("should switch active class on scroll", function () { + var sectionHTML = '
' + , $section = $(sectionHTML).append('#qunit-fixture') + , topbarHTML ='
' + + '
' + + '
' + + '

Bootstrap

' + + '' + + '
' + + '
' + + '
' + , $topbar = $(topbarHTML).scrollspy() + + ok($topbar.find('.active', true)) + }) + +}) -- cgit v1.2.3