diff --git a/test/unit/filters.test.js b/test/unit/filters.test.js index ab8c98c79..fc2a55e62 100644 --- a/test/unit/filters.test.js +++ b/test/unit/filters.test.js @@ -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({ @@ -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'); + }); + });