Ghost/ghost/core/test/e2e-api/admin/collections.test.js
Naz 36eff3a481 Added GET /collections to Admin API
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
2023-05-19 20:42:46 +07:00

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();
});
});