0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/test/unit/web/shared/middleware/api/spam-prevention_spec.js

18 lines
643 B
JavaScript
Raw Normal View History

const should = require('should');
const spamPrevention = require('../../../../../../core/server/web/shared/middlewares/api/spam-prevention');
describe('Spam Prevention', function () {
it('exports a contentApiKey method', function () {
should.equal(typeof spamPrevention.contentApiKey, 'function');
});
describe('contentApiKey method', function () {
it('returns an instance of express-brute', function () {
const ExpressBrute = require('express-brute');
const result = spamPrevention.contentApiKey();
should.equal(result instanceof ExpressBrute, true);
});
});
});