aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/progressbar/progressbar_methods.js
diff options
context:
space:
mode:
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);