diff options
author | Thomas Park <thomas@thomaspark.me> | 2013-08-06 15:19:12 -0400 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.me> | 2013-08-06 15:19:12 -0400 |
commit | 4642156cbc6da4a9e25dce2168f2fb9b726de042 (patch) | |
tree | d62aec0ebf977e008d016d8af15e54e26d5089b4 /2/bower_components/bootstrap/js/tests/unit/bootstrap-scrollspy.js | |
parent | 20e2d90874a3e1116c76e1547210d191dd0159f4 (diff) |
unignore bower_components
Diffstat (limited to '2/bower_components/bootstrap/js/tests/unit/bootstrap-scrollspy.js')
-rw-r--r-- | 2/bower_components/bootstrap/js/tests/unit/bootstrap-scrollspy.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/2/bower_components/bootstrap/js/tests/unit/bootstrap-scrollspy.js b/2/bower_components/bootstrap/js/tests/unit/bootstrap-scrollspy.js new file mode 100644 index 00000000..32bfa713 --- /dev/null +++ b/2/bower_components/bootstrap/js/tests/unit/bootstrap-scrollspy.js @@ -0,0 +1,37 @@ +$(function () { + + module("bootstrap-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 = '<div id="masthead"></div>' + , $section = $(sectionHTML).append('#qunit-fixture') + , topbarHTML ='<div class="topbar">' + + '<div class="topbar-inner">' + + '<div class="container">' + + '<h3><a href="#">Bootstrap</a></h3>' + + '<ul class="nav">' + + '<li><a href="#masthead">Overview</a></li>' + + '</ul>' + + '</div>' + + '</div>' + + '</div>' + , $topbar = $(topbarHTML).scrollspy() + + ok($topbar.find('.active', true)) + }) + +})
\ No newline at end of file |