Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created September 19, 2012 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsakamoto/3747000 to your computer and use it in GitHub Desktop.
Save jsakamoto/3747000 to your computer and use it in GitHub Desktop.
/// <reference path="qunit.js" />
/// <reference path="jquery-1.7.2.min.js" />
/// <reference path="jquery.disabled-if-check-off.js" />
test('initial state of text box is disabled.', function(){
$('#cb1').disabledIfCheckOff();
Qunit.equal($('#cb1').prop('checked'), false);
Qunit.equal($('#tb1').prop('disabled'), true);
});
test('text box change to eanble if click chek box.', function(){
$('#cb1').disabledIfCheckOff()
.click();
Qunit.equal($('#cb1').prop('checked'), true);
Qunit.equal($('#tb1').prop('disabled'), false);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment