aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/widget
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-07-30 12:38:18 -0400
committerScott González <scott.gonzalez@gmail.com>2010-07-30 12:38:18 -0400
commit58ae7ce2fd20fb865c9087fb2eae0dbdb39fc9a7 (patch)
treeedba4fc37f64d163273c41d4a166cb25a6e9243a /tests/unit/widget
parentdffcba0ba6d77413f700fba46e4ed5eabe74359f (diff)
downloadjquery-ui-58ae7ce2fd20fb865c9087fb2eae0dbdb39fc9a7.tar.gz
jquery-ui-58ae7ce2fd20fb865c9087fb2eae0dbdb39fc9a7.zip
Revert "Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack"
This reverts commit ea58cd5ac0d852a9c7d7ceadbcbb74006cf9052d.
Diffstat (limited to 'tests/unit/widget')
-rw-r--r--tests/unit/widget/widget_core.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index 52c91d51e..3c870f1fe 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -151,8 +151,7 @@ test(".widget() - base", function() {
_create: function() {}
});
var div = $("<div></div>").testWidget()
- same(div.testWidget("widget")[0], div[0]);
- same(div.testWidget("widget").end()[0], div[0]);
+ same(div[0], div.testWidget("widget")[0]);
});
test(".widget() - overriden", function() {
@@ -160,12 +159,10 @@ test(".widget() - overriden", function() {
$.widget("ui.testWidget", {
_create: function() {},
widget: function() {
- return this.element.pushStack(wrapper.get());
+ return wrapper;
}
});
- var div = $("<div></div>").testWidget();
- same(div.testWidget("widget")[0], wrapper[0]);
- same(div.testWidget("widget").end()[0], div[0]);
+ same(wrapper[0], $("<div></div>").testWidget().testWidget("widget")[0]);
});
})(jQuery);