aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2014-08-21 09:02:45 -0400
committerScott González <scott.gonzalez@gmail.com>2014-08-27 09:08:01 -0400
commit1abf9fc71f11996168fd81da7ebf25218f5ad4a4 (patch)
tree8e26cbdf48cecd5062fea0e28f715ab5a02a35c3 /tests
parentbfb65076e4727d4d7fc88561b0304853accb925c (diff)
downloadjquery-ui-1abf9fc71f11996168fd81da7ebf25218f5ad4a4.tar.gz
jquery-ui-1abf9fc71f11996168fd81da7ebf25218f5ad4a4.zip
Widget: Ensure window and document are defined in _getCreateOptions()
Closes gh-1320
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/widget/widget_core.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index 2fdb9bc76..6b5cdeaa3 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -260,7 +260,7 @@ test( "merge multiple option arguments", function() {
});
test( "._getCreateOptions()", function() {
- expect( 1 );
+ expect( 3 );
$.widget( "ui.testWidget", {
options: {
option1: "valuex",
@@ -268,6 +268,9 @@ test( "._getCreateOptions()", function() {
option3: "value3"
},
_getCreateOptions: function() {
+ strictEqual( this.window[ 0 ], window, "this.window is properly defined" );
+ strictEqual( this.document[ 0 ], document, "this.document is properly defined" );
+
return {
option1: "override1",
option2: "overideX"