mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
36eff3a481
refs https://github.com/TryGhost/Team/issues/3167 - This is scaffolding for collections API. Contains wiring for service wrapper, e2e test, and a browse endpoint - Adds basic implementation of the GET /collections endpoint to build up upon - Note, there are no permissions in this version as they will be added in later stages of development with migrations etc
28 lines
632 B
JavaScript
28 lines
632 B
JavaScript
const {
|
|
agentProvider,
|
|
fixtureManager,
|
|
mockManager
|
|
} = require('../../utils/e2e-framework');
|
|
|
|
describe.only('Collections API', function () {
|
|
let agent;
|
|
|
|
before(async function () {
|
|
agent = await agentProvider.getAdminAPIAgent();
|
|
await fixtureManager.init('users');
|
|
await agent.loginAsOwner();
|
|
});
|
|
|
|
afterEach(function () {
|
|
mockManager.restore();
|
|
});
|
|
|
|
it('Can browse Collections', async function () {
|
|
await agent
|
|
.get('/collections/')
|
|
.expectStatus(200)
|
|
.matchHeaderSnapshot()
|
|
.matchBodySnapshot();
|
|
});
|
|
});
|