mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -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
715 B
JavaScript
17 lines
715 B
JavaScript
const should = require('should');
|
|
const middleware = require('../../../../../../../core/server/web/api/v3/content/middleware');
|
|
|
|
describe('Content Api v3 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);
|
|
});
|
|
});
|
|
});
|