aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_methods.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-04-06 20:23:50 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-09 09:26:27 -0400
commit7d4811206f8b64e9bd8eea168a77edf23629659b (patch)
treeb22edbe4117b692ced3f803fd5192c046229e56e /tests/unit/dialog/dialog_methods.js
parent0714f55ad48c9d3dace29003677353f5e152a13a (diff)
downloadjquery-ui-7d4811206f8b64e9bd8eea168a77edf23629659b.tar.gz
jquery-ui-7d4811206f8b64e9bd8eea168a77edf23629659b.zip
Dialog: Convert tests to new infrastructure
Ref #10119 Ref gh-1528
Diffstat (limited to 'tests/unit/dialog/dialog_methods.js')
-rw-r--r--tests/unit/dialog/dialog_methods.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js
index c92f1f1b4..10b0fd7bb 100644
--- a/tests/unit/dialog/dialog_methods.js
+++ b/tests/unit/dialog/dialog_methods.js
@@ -1,7 +1,7 @@
-/*
- * dialog_methods.js
- */
-(function($) {
+define( [
+ "jquery",
+ "ui/dialog"
+], function( $ ) {
module("dialog: methods", {
teardown: function() {
@@ -33,18 +33,18 @@ test("init", function() {
ok(true, "arbitrary option setter after init");
});
-test("destroy", function() {
+test("destroy", function( assert ) {
expect( 17 );
var element, element2;
$( "#dialog1, #form-dialog" ).hide();
- domEqual( "#dialog1", function() {
+ assert.domEqual( "#dialog1", function() {
var dialog = $( "#dialog1" ).dialog().dialog( "destroy" );
equal( dialog.parent()[ 0 ], $( "#qunit-fixture" )[ 0 ] );
equal( dialog.index(), 0 );
});
- domEqual( "#form-dialog", function() {
+ assert.domEqual( "#form-dialog", function() {
var dialog = $( "#form-dialog" ).dialog().dialog( "destroy" );
equal( dialog.parent()[ 0 ], $( "#qunit-fixture" )[ 0 ] );
equal( dialog.index(), 2 );
@@ -56,7 +56,7 @@ test("destroy", function() {
minHeight: "100px",
height: "200px"
});
- domEqual( "#dialog1", function() {
+ assert.domEqual( "#dialog1", function() {
$( "#dialog1" ).dialog().dialog( "destroy" );
});
@@ -264,4 +264,4 @@ test("#5531: dialog width should be at least minWidth on creation", function ()
});
-})(jQuery);
+} );