aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/deprecated.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-04-07 10:55:52 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-09 09:27:00 -0400
commitbde431bb449b1d957d4e0b736111ff342f2a919d (patch)
tree27fd40037c30dbff8ef3b6113e90817ab96b53bf /tests/unit/dialog/deprecated.js
parentdc4b015a8b9acdb5bff2d5dd89737b3d8b64097f (diff)
downloadjquery-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.js30
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();
+});
+
+} );