From da89fcbc07f236d43e6a1edd98603beea6e245b6 Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 21 Jan 2012 08:45:41 -0500 Subject: Widget: Added _getCreateEventData(). Fixes #8045 - Widget: Ability to provide event data for create event. --- tests/unit/widget/widget_core.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') 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() { $( "
" ).testWidget({ option2: "value2" }); }); +test( "._getCreateEventData()", function() { + expect( 1 ); + var data = { foo: "bar" }; + $.widget( "ui.testWidget", { + _getCreateEventData: function() { + return data; + } + }); + $( "
" ).testWidget({ + create: function( event, ui ) { + strictEqual( ui, data, "event data" ); + } + }); +}); + test( "re-init", function() { var div = $( "
" ), actions = []; -- cgit v1.2.3