Skip to content

Instantly share code, notes, and snippets.

@mikedfunk
Created October 21, 2011 19:47
Show Gist options
  • Save mikedfunk/1304755 to your computer and use it in GitHub Desktop.
Save mikedfunk/1304755 to your computer and use it in GitHub Desktop.
loading_in test
// --------------------------------------------------------------------------
/**
* loading_in
*/
module ('', {
setup: function()
{
var the_html = '<a class="click_me">initial text</a>';
$('#qunit-fixture').html(the_html);
},
teardown: function()
{
$('#qunit-fixture').empty();
}
});
test('loading_in()', function()
{
expect(2);
loading_in($('a.click_me'));
ok($('.click_me').hasClass('disabled'), 'Is it disabled?');
equal($('.click_me').html(), 'Loading...', 'Right content?');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment