-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42453d2
commit eade504
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
const { introspectAs } = require("./utils"); | ||
|
||
describe("flows status history", () => { | ||
describe("public", () => { | ||
let i; | ||
beforeAll(async () => { | ||
i = await introspectAs("public"); | ||
}); | ||
|
||
test("cannot query flow_status_history", () => { | ||
expect(i.queries).not.toContain("flow_status_history"); | ||
}); | ||
|
||
test("cannot create, update, or delete flows or their associated operations", () => { | ||
expect(i).toHaveNoMutationsFor("flow_status_history"); | ||
}); | ||
}); | ||
|
||
describe("admin", () => { | ||
let i; | ||
beforeAll(async () => { | ||
i = await introspectAs("admin"); | ||
}); | ||
|
||
test("has full access to flow_status_history", () => { | ||
expect(i.queries).toContain("flow_status_history"); | ||
expect(i.mutations).toContain("insert_flow_status_history"); | ||
expect(i.mutations).toContain("insert_flow_status_history_one"); | ||
expect(i.mutations).toContain("update_flow_status_history_by_pk"); | ||
expect(i.mutations).toContain("delete_flow_status_history"); | ||
}); | ||
}); | ||
|
||
describe("platformAdmin", () => { | ||
let i; | ||
beforeAll(async () => { | ||
i = await introspectAs("platformAdmin"); | ||
}); | ||
|
||
test("cannot query flow_status_history", () => { | ||
expect(i.queries).not.toContain("flow_status_history"); | ||
}); | ||
|
||
test("cannot create, update, or delete flows or their associated operations", () => { | ||
expect(i).toHaveNoMutationsFor("flow_status_history"); | ||
}); | ||
}); | ||
|
||
describe("teamEditor", () => { | ||
let i; | ||
beforeAll(async () => { | ||
i = await introspectAs("teamEditor"); | ||
}); | ||
|
||
test("cannot query flow_status_history", () => { | ||
expect(i.queries).not.toContain("flow_status_history"); | ||
}); | ||
|
||
test("cannot create, update, or delete flows or their associated operations", () => { | ||
expect(i).toHaveNoMutationsFor("flow_status_history"); | ||
}); | ||
}); | ||
|
||
describe("api", () => { | ||
let i; | ||
beforeAll(async () => { | ||
i = await introspectAs("api"); | ||
}); | ||
|
||
test("cannot query flow_status_history", () => { | ||
expect(i.queries).not.toContain("flow_status_history"); | ||
}); | ||
|
||
test("cannot create, update, or delete flows or their associated operations", () => { | ||
expect(i).toHaveNoMutationsFor("flow_status_history"); | ||
}); | ||
}); | ||
}); |