Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion js/libs/keycloak-admin-client/test/groups.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,25 @@ describe("Groups", () => {
expect(group).to.be.null;
});

it("create group with attributes", async () => {
const group = await kcAdminClient.groups.create({
name: "basic-group",
attributes: {
accessLevel: ["internal"],
project: ["alpha"],
},
});
Comment thread
shuji-oh marked this conversation as resolved.
expect(group.id).to.be.ok;
Comment thread
shuji-oh marked this conversation as resolved.
});

it("list groups", async () => {
const groups = await kcAdminClient.groups.find();
expect(groups).to.be.ok;
});

it("count groups", async () => {
const result = await kcAdminClient.groups.count();
expect(result.count).to.eq(1);
expect(result.count).to.eq(2);
});

it("count groups with filter", async () => {
Expand Down