diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-01-21 08:45:41 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-01-21 08:45:41 -0500 |
commit | da89fcbc07f236d43e6a1edd98603beea6e245b6 (patch) | |
tree | 7e73b10ce5eb3e58fa991dccfc50dd4212cdd76d /tests | |
parent | 0cf6bc042938a11abc09ed4e575c8792585607ac (diff) | |
download | jquery-ui-da89fcbc07f236d43e6a1edd98603beea6e245b6.tar.gz jquery-ui-da89fcbc07f236d43e6a1edd98603beea6e245b6.zip |
Widget: Added _getCreateEventData(). Fixes #8045 - Widget: Ability to provide event data for create event.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/widget/widget_core.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index 2e55ad703..df83abe91 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -261,6 +261,21 @@ test( "._getCreateOptions()", function() { $( "<div>" ).testWidget({ option2: "value2" }); }); +test( "._getCreateEventData()", function() { + expect( 1 ); + var data = { foo: "bar" }; + $.widget( "ui.testWidget", { + _getCreateEventData: function() { + return data; + } + }); + $( "<div>" ).testWidget({ + create: function( event, ui ) { + strictEqual( ui, data, "event data" ); + } + }); +}); + test( "re-init", function() { var div = $( "<div>" ), actions = []; |