From ded5dd5393769d8c7b7adfeeffcf0f8608b75ee9 Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Fri, 19 Jul 2024 11:37:02 +0100 Subject: [PATCH] alter hasura testing in line with permissions changes --- hasura.planx.uk/tests/team_integrations.test.js | 6 ++++-- hasura.planx.uk/tests/team_themes.test.js | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hasura.planx.uk/tests/team_integrations.test.js b/hasura.planx.uk/tests/team_integrations.test.js index a46a813f3b..33c11d6cc4 100644 --- a/hasura.planx.uk/tests/team_integrations.test.js +++ b/hasura.planx.uk/tests/team_integrations.test.js @@ -40,8 +40,10 @@ describe("team_integrations", () => { expect(i.queries).not.toContain("team_integrations"); }); - test("cannot create, update, or delete team_integrations", () => { - expect(i).toHaveNoMutationsFor("team_integrations"); + test("can create but, cannot update, or delete team_integrations", () => { + expect(i.mutations).toContain("insert_team_integrations"); + expect(i.mutations).not.toContain("update_team_integrations_by_pk"); + expect(i.mutations).not.toContain("delete_team_integrations"); }); }); diff --git a/hasura.planx.uk/tests/team_themes.test.js b/hasura.planx.uk/tests/team_themes.test.js index e89ac77fc7..3fb0b57a37 100644 --- a/hasura.planx.uk/tests/team_themes.test.js +++ b/hasura.planx.uk/tests/team_themes.test.js @@ -37,8 +37,8 @@ describe("team_themes", () => { expect(i.queries).toContain("team_themes"); }); - test("cannot insert team_themes", () => { - expect(i.queries).not.toContain("insert_team_themes"); + test("can insert team_themes", () => { + expect(i.queries).toContain("insert_team_themes"); }); test("can query team_themes", async () => {