diff --git a/ghost/tiers/lib/Tier.js b/ghost/tiers/lib/Tier.js index 2040c86841..8a40c71655 100644 --- a/ghost/tiers/lib/Tier.js +++ b/ghost/tiers/lib/Tier.js @@ -186,7 +186,7 @@ module.exports = class Tier { toJSON() { return { - id: this.#id, + id: this.#id.toHexString(), slug: this.#slug, name: this.#name, description: this.#description, diff --git a/ghost/tiers/test/Tier.test.js b/ghost/tiers/test/Tier.test.js index 546a9050d9..51ed7286b9 100644 --- a/ghost/tiers/test/Tier.test.js +++ b/ghost/tiers/test/Tier.test.js @@ -99,7 +99,6 @@ describe('Tier', function () { const tier = await Tier.create(validInput); const expectedProps = [ - 'id', 'slug', 'name', 'description', @@ -119,6 +118,7 @@ describe('Tier', function () { for (const prop of expectedProps) { assert(tier[prop] === tier.toJSON()[prop]); } + assert(tier.id.toHexString() === tier.toJSON().id); }); it('Errors when attempting to set invalid properties', async function () {