Skip to content

Commit

Permalink
test: Fix Hasura tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 8, 2023
1 parent 6b2c367 commit 123d17a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions hasura.planx.uk/tests/analytics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand All @@ -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", () => {
Expand Down

0 comments on commit 123d17a

Please sign in to comment.