mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
9e96b04542
- 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
18 lines
646 B
JavaScript
18 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);
|
|
});
|
|
});
|
|
});
|