mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
- this is a small part of a bit of cleanup of our test files - the goal is to make the existing tests clearer with a view to making it easier to write more tests - this makes the test structure follow the codebase structure more closely - eventually we will colocate the tests as we break the codebase down further
17 lines
646 B
JavaScript
17 lines
646 B
JavaScript
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);
|
|
});
|
|
});
|
|
});
|