Add noConflict to many widgets.
[profile/ivi/cowhide.git] / tests / unit / cowhide-simple-scrollable.js
1 $(function () {
2
3     module("cowhide-simple-scrollable")
4
5       test("should provide no conflict", function () {
6         var simple_scrollable = $.fn.ch_simple_scrollable.noConflict()
7         ok(!$.fn.ch_simple_scrollable, 'simple_scrollable was set back to undefined (org value)')
8         $.fn.ch_simple_scrollable = simple_scrollable
9       })
10
11       test("widget has been made scrollable", function () {
12         var page = $('<div class="page"></div>')
13         var scrollable = $('<div class="ch-simple-scrollable"><p>Test</p></div>')
14
15         scrollable.appendTo(page)
16         scrollable.ch_simple_scrollable('enable')
17
18         ok(scrollable.find('.ch-simple-scrollable-content').length > 0, "element has ch-simple-scrollable-content child")
19       })
20 })