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
717 B
JavaScript
17 lines
717 B
JavaScript
const should = require('should');
|
|
const middleware = require('../../../../../../core/server/web/api/canary/content/middleware');
|
|
|
|
describe('Content Api canary middleware', function () {
|
|
it('exports an authenticatePublic middleware', function () {
|
|
should.exist(middleware.authenticatePublic);
|
|
});
|
|
|
|
describe('authenticatePublic', function () {
|
|
it('uses brute content api middleware as the first middleware in the chain', function () {
|
|
const firstMiddleware = middleware.authenticatePublic[0];
|
|
const brute = require('../../../../../../core/server/web/shared/middlewares/brute');
|
|
|
|
should.equal(firstMiddleware, brute.contentApiKey);
|
|
});
|
|
});
|
|
});
|