09360060847e86d3fa31ce4ab7516d1ca8a59b63
[profile/ivi/cowhide.git] / tests / unit / cowhide-radio-input.js
1 $(function () {
2
3     module("cowhide-radio-input", {
4       setup: function() {
5         // Resets the driving state
6         $.cowhide.setDrivingMode(false)
7       }
8     })
9
10       test("should be disabled when driving", function () {
11         var page = $('<div class="page"></div>')
12         var input = $('<input type="radio">test</input>')
13         input.appendTo(page)
14         input.ch_radio_input()
15         $.cowhide.setDrivingMode(true)
16         stop()
17         setTimeout(function () {
18           ok(input.attr('disabled'), 'input is disabled')
19           ok(input.hasClass('disabled'), 'input has disabled class')
20           start()
21         }, 0)
22       })
23 })