aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-02-21 14:45:54 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-02-21 14:45:54 +0100
commit84a4a4442d25631bd00b50d48ff2d57a6089f6d3 (patch)
tree111c327befdc3cff15384d0dc56f9ff09281a651 /tests
parent5082e3e9717afaf0d6da1f863341d660c74c951c (diff)
parent7c4d6a763dfb5f9debf30c9a20875e046e89bc76 (diff)
downloadjquery-ui-84a4a4442d25631bd00b50d48ff2d57a6089f6d3.tar.gz
jquery-ui-84a4a4442d25631bd00b50d48ff2d57a6089f6d3.zip
Merge branch 'master' of github.com:jquery/jquery-ui
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/widget/widget_core.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index b92885fd9..11325140f 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -166,9 +166,11 @@ test( "direct usage", function() {
});
test( "error handling", function() {
- expect( 2 );
+ expect( 3 );
var error = $.error;
- $.widget( "ui.testWidget", {} );
+ $.widget( "ui.testWidget", {
+ _privateMethod: function () {}
+ });
$.error = function( msg ) {
equal( msg, "cannot call methods on testWidget prior to initialization; " +
"attempted to call method 'missing'", "method call before init" );
@@ -179,6 +181,11 @@ test( "error handling", function() {
"invalid method call on widget instance" );
};
$( "<div>" ).testWidget().testWidget( "missing" );
+ $.error = function ( msg ) {
+ equal( msg, "no such method '_privateMethod' for testWidget widget instance",
+ "invalid method call on widget instance" );
+ };
+ $( "<div>" ).testWidget().testWidget( "_privateMethod" );
$.error = error;
});