mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merged v5.22.2 into main
v5.22.2
This commit is contained in:
commit
498bec08cf
5 changed files with 27 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ghost-admin",
|
"name": "ghost-admin",
|
||||||
"version": "5.22.1",
|
"version": "5.22.2",
|
||||||
"description": "Ember.js admin client for Ghost",
|
"description": "Ember.js admin client for Ghost",
|
||||||
"author": "Ghost Foundation",
|
"author": "Ghost Foundation",
|
||||||
"homepage": "http://ghost.org",
|
"homepage": "http://ghost.org",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ghost",
|
"name": "ghost",
|
||||||
"version": "5.22.1",
|
"version": "5.22.2",
|
||||||
"description": "The professional publishing platform",
|
"description": "The professional publishing platform",
|
||||||
"author": "Ghost Foundation",
|
"author": "Ghost Foundation",
|
||||||
"homepage": "https://ghost.org",
|
"homepage": "https://ghost.org",
|
||||||
|
|
|
@ -126,4 +126,20 @@ describe('Tiers API', function () {
|
||||||
|
|
||||||
assert(updatedTier.trial_days === 0, `The trial_days should have been set to 0`);
|
assert(updatedTier.trial_days === 0, `The trial_days should have been set to 0`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Can edit description', async function () {
|
||||||
|
const {body: {tiers: [tier]}} = await agent.get('/tiers/?type:paid&limit=1');
|
||||||
|
|
||||||
|
await agent.put(`/tiers/${tier.id}/`)
|
||||||
|
.body({
|
||||||
|
tiers: [{
|
||||||
|
description: 'Updated description'
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
.expectStatus(200);
|
||||||
|
|
||||||
|
const {body: {tiers: [updatedTier]}} = await agent.get(`/tiers/${tier.id}/`);
|
||||||
|
|
||||||
|
assert.strictEqual('Updated description', updatedTier.description);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -338,6 +338,7 @@ function validateDescription(value) {
|
||||||
message: 'Tier description must be a string with a maximum of 191 characters'
|
message: 'Tier description must be a string with a maximum of 191 characters'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateStatus(value) {
|
function validateStatus(value) {
|
||||||
|
|
|
@ -251,5 +251,13 @@ describe('Tier', function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Can set the description of a Tier', async function () {
|
||||||
|
const tier = await Tier.create(validInput);
|
||||||
|
|
||||||
|
tier.description = 'Updated description';
|
||||||
|
|
||||||
|
assert.strictEqual('Updated description', tier.description);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue