mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
7f1d3ebc07
- move all test files from core/test to test/ - updated all imports and other references - all code inside of core/ is then application code - tests are correctly at the root level - consistent with other repos/projects Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
17 lines
643 B
JavaScript
17 lines
643 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);
|
|
});
|
|
});
|
|
});
|