Skip to content

Commit

Permalink
Added missing test case for falsy param requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Kretschek committed Jul 15, 2014
1 parent ccfef68 commit 94d0b84
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parameters.js
Expand Up @@ -190,6 +190,21 @@
});


it('ignores falsy params', function () {
var params = {
query : null,
body : false,
header : undefined,
arbitrary : 0
};

var middleware = parameters(params);

middleware(req, res, next);
expect(next).to.have.been.called;
});


it('respects the property in which each param should be found',
function () {
var params = {
Expand Down

0 comments on commit 94d0b84

Please sign in to comment.