diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-15 22:51:26 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-26 10:28:22 +0100 |
commit | fed2972027f362181a614750fbaa7e252d1c1cb2 (patch) | |
tree | e123a9296a516486804350d303b8977e9b12813d /tests/unit/dialog | |
parent | 83a9f219bf40ff834d660020bbfa7de550e48a0c (diff) | |
download | jquery-ui-fed2972027f362181a614750fbaa7e252d1c1cb2.tar.gz jquery-ui-fed2972027f362181a614750fbaa7e252d1c1cb2.zip |
Dialog: Refactor _setOption to call _super early. Move dialogClass update above that to access old option value.
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/dialog_options.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index 2df7196dc..0be8c2b7f 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -148,7 +148,7 @@ test("closeText", function() { }); test("dialogClass", function() { - expect(4); + expect( 6 ); var el = $('<div></div>').dialog(); equal(el.dialog('widget').is(".foo"), false, 'dialogClass not specified. foo class added'); @@ -156,6 +156,9 @@ test("dialogClass", function() { el = $('<div></div>').dialog({ dialogClass: "foo" }); equal(el.dialog('widget').is(".foo"), true, 'dialogClass in init. foo class added'); + el.dialog( "option", "dialogClass", "foobar" ); + equal( el.dialog('widget').is(".foo"), false, "dialogClass changed, previous one was removed" ); + equal( el.dialog('widget').is(".foobar"), true, "dialogClass changed, new one was added" ); el.remove(); el = $('<div></div>').dialog({ dialogClass: "foo bar" }); |