From a7eb9c294a575b5471ddec45ae75e1d09f7ace4c Mon Sep 17 00:00:00 2001 From: fat Date: Fri, 7 Dec 2012 17:06:01 -0500 Subject: add noConflict functionality to all bootstrap plugins --- js/tests/unit/bootstrap-scrollspy.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/tests/unit/bootstrap-scrollspy.js') diff --git a/js/tests/unit/bootstrap-scrollspy.js b/js/tests/unit/bootstrap-scrollspy.js index bee46a925..32bfa7134 100644 --- a/js/tests/unit/bootstrap-scrollspy.js +++ b/js/tests/unit/bootstrap-scrollspy.js @@ -2,6 +2,12 @@ $(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') }) -- cgit v1.2.3