added tests for disabled property

This commit is contained in:
carhartl 2010-04-22 03:31:29 +08:00 committed by Scott González
parent a4488aff7c
commit 008def00bd

View File

@ -64,7 +64,20 @@ test('cookie', function() {
}); });
test('disabled', function() { test('disabled', function() {
ok(false, "missing test - untested code is broken code."); expect(4);
el = $('#tabs1').tabs();
same(el.tabs('option', 'disabled'), [ ], "should not disable any tab by default");
el.tabs('option', 'disabled', [ 1 ]);
same(el.tabs('option', 'disabled'), [ 1 ], "should set property"); // everything else is being tested in methods module...
// FIXME bug... property needs to be [ 1 ], since selected tab cannot be disabled!
el.tabs('option', 'disabled', [ 0, 1 ]);
same(el.tabs('option', 'disabled'), [ 1 ], "should disable given tabs but not selected one"); // ...
el.tabs('option', 'disabled', [ ]);
same(el.tabs('option', 'disabled'), [ ], "should not disable any tab"); // ...
}); });
test('event', function() { test('event', function() {