Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
fix(method): throws exception on invalid method
Browse files Browse the repository at this point in the history
Instead, default to GET.

closes #62
  • Loading branch information
Ray Nicholus committed May 16, 2015
1 parent 4086609 commit dc47d6f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/typical-form-tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@
});

describe('submit interception', function () {
it('uses default method of GET', function (done) {
createForm({method: 'foobar'}, function () {
ajaxForm.submit();
expect(requests[0].method).to.equal('GET');
done();
})
});

it('submit method is overridden', function (done) {
createForm({method: 'GET'}, function () {
ajaxForm.addEventListener('submit', function () {
Expand Down

0 comments on commit dc47d6f

Please sign in to comment.