Rather hackish, but I've solved the problem with the following:

  var didSubmit = false;

  $('#theform').bind('submit', function() {
        didSubmit = true;
        return false;
  });

  //The call that causes the form to submit

  ok (didSubmit, "Form should be submitted");

Thanks!


On Nov 19, 12:43 pm, todd <[EMAIL PROTECTED]> wrote:
> I'm new to QUnit (and to JQuery for that matter). I have a function
> that calls "submit" on a form and am looking for a way to mock the
> form, or at least intercept the call to submit. I want to test that
> the form is getting submitted, but I don't want the submit to actually
> occur.
>
> Any suggestions?
>
> Todd

Reply via email to