From 123d17ae18dc80fedad4c5f311969babdea2c89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 8 Nov 2023 18:31:54 +0000 Subject: [PATCH] test: Fix Hasura tests --- hasura.planx.uk/tests/analytics.test.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hasura.planx.uk/tests/analytics.test.js b/hasura.planx.uk/tests/analytics.test.js index 5147eb2a17..63b69a6d26 100644 --- a/hasura.planx.uk/tests/analytics.test.js +++ b/hasura.planx.uk/tests/analytics.test.js @@ -12,10 +12,16 @@ describe("analytics and analytics_logs", () => { expect(i.queries).toContain("analytics_logs"); }); - test("can create analytics but not update or delete them", () => { + test("can create analytics", () => { expect(i.mutations).toContain("insert_analytics_one"); - expect(i.mutations).not.toContain("update_analytics_by_pk"); - expect(i.mutations).not.toContain("update_analytics"); + }); + + test("can update analytics", () => { + expect(i.mutations).toContain("update_analytics_by_pk"); + expect(i.mutations).toContain("update_analytics"); + }); + + test("cannot delete analytics", () => { expect(i.mutations).not.toContain("delete_analytics"); expect(i.mutations).not.toContain("delete_analytics_by_pk"); }); @@ -25,7 +31,7 @@ describe("analytics and analytics_logs", () => { expect(i.mutations).toContain("update_analytics_logs_by_pk"); expect(i.mutations).not.toContain("delete_analytics_logs"); expect(i.mutations).not.toContain("delete_analytics_logs_by_pk"); - }) + }); }); describe("admin", () => {