aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/progressbar/progressbar_methods.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-05-31 18:43:42 +0200
committerFelix Nagel <info@felixnagel.com>2012-05-31 18:43:42 +0200
commit749c8fbb6673a15c6477b43d6a6a4f7101f85a5b (patch)
treee10cd0ba0124f646d568e1dea5aa177d14f949cc /tests/unit/progressbar/progressbar_methods.js
parent8abe1d015f5b8d1aa68ccc9dd1ad4744b0216938 (diff)
parente0fe788ee0c0c0d8d23f9d90b9acff713ba1302f (diff)
downloadjquery-ui-749c8fbb6673a15c6477b43d6a6a4f7101f85a5b.tar.gz
jquery-ui-749c8fbb6673a15c6477b43d6a6a4f7101f85a5b.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/progressbar/progressbar_methods.js')
-rw-r--r--tests/unit/progressbar/progressbar_methods.js43
1 files changed, 12 insertions, 31 deletions
diff --git a/tests/unit/progressbar/progressbar_methods.js b/tests/unit/progressbar/progressbar_methods.js
index 966c0c55a..89478b9b1 100644
--- a/tests/unit/progressbar/progressbar_methods.js
+++ b/tests/unit/progressbar/progressbar_methods.js
@@ -1,36 +1,17 @@
-/*
- * progressbar_methods.js
- */
-(function($) {
+module( "progressbar: methods" );
-module("progressbar: methods");
-
-test("init", function() {
- expect(1);
-
- $("<div></div>").appendTo('body').progressbar().remove();
- ok(true, '.progressbar() called on element');
-
-});
-
-test("destroy", function() {
- expect(2);
-
- $("<div></div>").appendTo('body').progressbar().progressbar("destroy").remove();
- ok(true, '.progressbar("destroy") called on element');
-
- var expected = $('<div></div>').progressbar(),
- actual = expected.progressbar('destroy');
- equal(actual, expected, 'destroy is chainable');
+test( "destroy", function() {
+ expect( 1 );
+ domEqual( "#progressbar", function() {
+ $( "#progressbar" ).progressbar().progressbar( "destroy" );
+ });
});
-test('value', function() {
- expect(3);
+test( "value", function() {
+ expect( 3 );
- var el = $('<div></div>').progressbar({ value: 20 });
- equal(el.progressbar('value'), 20, 'correct value as getter');
- equal(el.progressbar('value', 30), el, 'chainable as setter');
- equal(el.progressbar('option', 'value'), 30, 'correct value after setter');
+ var element = $( "<div>" ).progressbar({ value: 20 });
+ equal( element.progressbar( "value" ), 20, "correct value as getter" );
+ equal( element.progressbar( "value", 30), element, "chainable as setter" );
+ equal( element.progressbar( "option", "value" ), 30, "correct value after setter" );
});
-
-})(jQuery);