From 7c805b717614635c8a57b77df7e92d6d9b8c36a9 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Thu, 2 Mar 2023 16:35:13 +0800 Subject: [PATCH] Revert "Added new created tier e2e test" This reverts commit dc988689616490c2ae75dc8cd5203eb0de75c839. --- .../admin/__snapshots__/tiers.test.js.snap | 24 ------------------- ghost/core/test/e2e-api/admin/tiers.test.js | 20 ---------------- 2 files changed, 44 deletions(-) diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/tiers.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/tiers.test.js.snap index bc41ef16d4..ae9a9a1efb 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/tiers.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/tiers.test.js.snap @@ -48,30 +48,6 @@ Object { } `; -exports[`Tiers API Can create a new tier 1: [body] 1`] = ` -Object { - "tiers": Array [ - Object { - "active": true, - "benefits": Array [], - "created_at": "2023-03-02T08:10:21.752Z", - "currency": "USD", - "description": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "monthly_price": 100, - "name": "new tier", - "slug": "new-tier", - "trial_days": 0, - "type": "paid", - "updated_at": null, - "visibility": "public", - "welcome_page_url": null, - "yearly_price": 5000, - }, - ], -} -`; - exports[`Tiers API Can edit tier properties and relations 1: [body] 1`] = ` Object { "meta": Object { diff --git a/ghost/core/test/e2e-api/admin/tiers.test.js b/ghost/core/test/e2e-api/admin/tiers.test.js index 4f2aa8f373..5a4a523ca6 100644 --- a/ghost/core/test/e2e-api/admin/tiers.test.js +++ b/ghost/core/test/e2e-api/admin/tiers.test.js @@ -166,24 +166,4 @@ describe('Tiers API', function () { }) }); }); - it('Can create a new tier', async function () { - const tier = { - name: 'new tier', - monthly_price: 100, - currency: 'usd' - }; - - await agent - .post('/tiers/') - .body({tiers: [tier]}) - .expectStatus(201) - .matchBodySnapshot({ - tiers: Array(1).fill({ - id: matchers.anyObjectId, - name: 'new tier', - monthly_price: 100, - currency: 'USD' - }) - }); - }); });