Permalink
Browse files

Make sure custom error failures are thrown correctly

  • Loading branch information...
1 parent 730bd9a commit 7e20e92117d214183b2c6f04332f307e3cb03f1e @dandean committed Jul 25, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/validate.test.js
View
2 test/validate.test.js
@@ -518,7 +518,9 @@ module.exports = {
assert.ok(formData);
assert.equal("value1", formData.field1);
assert.equal("value2", formData.field2);
+ throw new Error("This is a custom error thrown for %s.");
}))(request, {});
+ assert.equal(request.form.errors.length, 1);
},
"validation : request.form property-pollution": function() {

0 comments on commit 7e20e92

Please sign in to comment.