mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 08:31:43 +03:00
d9e6dfe97e
refs https://github.com/TryGhost/Team/issues/1575 - Updates the admin-api-schema to reflect new data structure - Updates members-api to allow Portal to use new data structure - Data is only mapped at the serialised level to avoid changing the underlying implementation - Ensure only one version of domain-events present in yarn.lock
27 lines
882 B
JavaScript
27 lines
882 B
JavaScript
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
|
|
|
|
describe('Tiers Content API', function () {
|
|
let agent;
|
|
|
|
before(async function () {
|
|
agent = await agentProvider.getContentAPIAgent();
|
|
await fixtureManager.init('members', 'api_keys', 'tiers:archived');
|
|
agent.authenticate();
|
|
});
|
|
|
|
it('Can request only active tiers', async function () {
|
|
await agent.get('/tiers/?include=monthly_price,yearly_price,benefits')
|
|
.expectStatus(200)
|
|
.matchHeaderSnapshot({
|
|
etag: matchers.anyEtag
|
|
})
|
|
.matchBodySnapshot({
|
|
tiers: Array(2).fill({
|
|
id: matchers.anyObjectId,
|
|
created_at: matchers.anyISODate,
|
|
updated_at: matchers.anyISODate
|
|
})
|
|
});
|
|
});
|
|
});
|