Skip to content

Commit

Permalink
test: add edge case test to filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Aug 24, 2016
1 parent 73851dc commit d37d2cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/unit/filters.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Filters = require('../../lib/filters');
tap('filter on body', t => {
const filter = Filters(__dirname + '/../fixtures/relay.json');

t.plan(7);
t.plan(8);
t.ok('filters loaded');

filter({
Expand Down Expand Up @@ -58,4 +58,14 @@ tap('filter on body', t => {
t.equal(res, undefined, 'no follow allowed');
});

filter({
url: '/',
method: 'POST',
body: {
commits: []
}
}, (error, res) => {
t.equal(error.message, 'blocked', 'has been blocked');
});

});

0 comments on commit d37d2cb

Please sign in to comment.