add ajaxOptions param to sumbit method, fixes

This commit is contained in:
vitalets
2012-12-06 22:04:08 +04:00
parent 1b87f99110
commit 01a6788270
3 changed files with 25 additions and 15 deletions

@ -213,7 +213,6 @@ $(function () {
});
asyncTest("'submit' method: client and server validation", function () {
expect(6);
var ev1 = 'ev1',
ev2 = 'ev2',
e1v = 'e1v',
@ -230,6 +229,7 @@ $(function () {
equal(settings.data.text, ev2, 'first value ok');
equal(settings.data.text1, e1v, 'second value ok');
equal(settings.data.a, 123, 'custom data ok');
equal(settings.type, 'PUT', 'ajaxOptions ok');
this.responseText = {errors: {
text1: 'server-invalid'
}
@ -256,11 +256,13 @@ $(function () {
data: {a: 123},
error: function(data) {
equal(data.errors.text1, 'server-invalid', 'server validation error ok');
e.remove();
e1.remove();
start();
}
},
ajaxOptions: {
type: 'PUT'
}
});
});
@ -339,4 +341,4 @@ $(function () {
equal(e.text(), groups[2], 'new text shown correctly');
});
});
});