diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-04-07 10:55:52 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-04-09 09:27:00 -0400 |
commit | bde431bb449b1d957d4e0b736111ff342f2a919d (patch) | |
tree | 27fd40037c30dbff8ef3b6113e90817ab96b53bf /tests/unit/dialog/deprecated.js | |
parent | dc4b015a8b9acdb5bff2d5dd89737b3d8b64097f (diff) | |
download | jquery-ui-bde431bb449b1d957d4e0b736111ff342f2a919d.tar.gz jquery-ui-bde431bb449b1d957d4e0b736111ff342f2a919d.zip |
Tests: Rename files
Ref gh-1528
Diffstat (limited to 'tests/unit/dialog/deprecated.js')
-rw-r--r-- | tests/unit/dialog/deprecated.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/unit/dialog/deprecated.js b/tests/unit/dialog/deprecated.js new file mode 100644 index 000000000..1f7087c57 --- /dev/null +++ b/tests/unit/dialog/deprecated.js @@ -0,0 +1,30 @@ +define( [ + "jquery", + "ui/dialog" +], function( $ ) { + +module( "dialog (deprecated): options" ); + +test( "dialogClass", function( assert ) { + expect( 5 ); + + var element = $( "<div>" ).dialog(), + widget = element.dialog( "widget" ); + assert.lacksClasses( widget, "foo", "dialogClass not specified. class not added" ); + element.remove(); + + element = $( "<div>" ).dialog({ dialogClass: "foo" }); + widget = element.dialog( "widget" ); + assert.hasClasses( widget, "foo", "dialogClass in init, foo class added" ); + element.dialog( "option", "dialogClass", "foobar" ); + assert.lacksClasses( widget, "foo", "dialogClass changed, previous one was removed" ); + assert.hasClasses( widget, "foobar", "dialogClass changed, new one was added" ); + element.remove(); + + element = $( "<div>" ).dialog({ dialogClass: "foo bar" }); + widget = element.dialog( "widget" ); + assert.hasClasses( widget, "foo bar", "dialogClass in init, two classes." ); + element.remove(); +}); + +} ); |