How to write test for this case using qunit

How to write test for this case using qunit

I have following code.

  1. $('a').live('click', function (e){
  2.   $('<form method="post" action="http://example.com/delete_me"></form>')
  3.     .appendTo('body')
  4.     .submit();
  5.   
  6.   e.preventDefault();
  7. });

When I write qunit test for above code, the form submits and then the url at the top changes from the test page to the url where form is submitted. It seems somehow I need to mock the form submission.

What will be a good way to test the above given case?