diff options
| author | Mark Otto <[email protected]> | 2012-10-29 22:01:58 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-10-29 22:01:58 -0700 |
| commit | b5af762ef59e1fa97f4386f5feadb67aa5183fef (patch) | |
| tree | 3bcd0841e6938379e8c8ae7259ee16f27a49ea41 /js/tests/unit/bootstrap-typeahead.js | |
| parent | 7426ced0fb288a9e86f18da1849ad74f652d219a (diff) | |
| parent | 68cfedb34af198f178128f8c9bc8ea164e44304a (diff) | |
| download | bootstrap-2.2.0.tar.xz bootstrap-2.2.0.zip | |
Merge branch '2.1.2-wip'v2.2.0
Conflicts:
js/bootstrap-dropdown.js
Diffstat (limited to 'js/tests/unit/bootstrap-typeahead.js')
| -rw-r--r-- | js/tests/unit/bootstrap-typeahead.js | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/js/tests/unit/bootstrap-typeahead.js b/js/tests/unit/bootstrap-typeahead.js index eb447aaa6..16bdb9194 100644 --- a/js/tests/unit/bootstrap-typeahead.js +++ b/js/tests/unit/bootstrap-typeahead.js @@ -13,14 +13,9 @@ $(function () { test("should listen to an input", function () { var $input = $('<input />') $input.typeahead() - ok($input.data('events').blur, 'has a blur event') - ok($input.data('events').keypress, 'has a keypress event') - ok($input.data('events').keyup, 'has a keyup event') - if ($.browser.webkit || $.browser.msie) { - ok($input.data('events').keydown, 'has a keydown event') - } else { - ok($input.data('events').keydown, 'does not have a keydown event') - } + ok($._data($input[0], 'events').blur, 'has a blur event') + ok($._data($input[0], 'events').keypress, 'has a keypress event') + ok($._data($input[0], 'events').keyup, 'has a keyup event') }) test("should create a menu", function () { @@ -32,8 +27,8 @@ $(function () { var $input = $('<input />') , $menu = $input.typeahead().data('typeahead').$menu - ok($menu.data('events').mouseover, 'has a mouseover(pseudo: mouseenter)') - ok($menu.data('events').click, 'has a click') + ok($._data($menu[0], 'events').mouseover, 'has a mouseover(pseudo: mouseenter)') + ok($._data($menu[0], 'events').click, 'has a click') }) test("should show menu when query entered", function () { @@ -201,4 +196,4 @@ $(function () { typeahead.$menu.remove() }) -}) +})
\ No newline at end of file |
