Keycloak
31 строка · 835.0 Байт
1// tslint:disable:no-unused-expression
2import * as chai from "chai";
3import { KeycloakAdminClient } from "../src/client.js";
4import { credentials } from "./constants.js";
5
6const expect = chai.expect;
7
8describe("Server Info", () => {
9let client: KeycloakAdminClient;
10
11before(async () => {
12client = new KeycloakAdminClient();
13await client.auth(credentials);
14});
15
16it("list server info", async () => {
17const serverInfo = await client.serverInfo.find();
18expect(serverInfo).to.be.ok;
19});
20
21it("list effective message bundles of a realm", async () => {
22const messageBundles = await client.serverInfo.findEffectiveMessageBundles({
23realm: "master",
24themeType: "admin",
25locale: "en",
26});
27
28expect(messageBundles).to.be.ok;
29expect(messageBundles.length).to.be.greaterThan(0);
30});
31});
32