mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 07:42:44 +00:00
test: collapse duplicate gateway token-generation cases
This commit is contained in:
@@ -65,23 +65,11 @@ describe("buildGatewayAuthConfig", () => {
|
|||||||
expect(result).toEqual({ mode: "password", password: "undefined" });
|
expect(result).toEqual({ mode: "password", password: "undefined" });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("generates random token when token param is undefined", () => {
|
it("generates random token for missing, empty, and coerced-literal token inputs", () => {
|
||||||
expectGeneratedTokenFromInput(undefined);
|
expectGeneratedTokenFromInput(undefined);
|
||||||
});
|
|
||||||
|
|
||||||
it("generates random token when token param is empty string", () => {
|
|
||||||
expectGeneratedTokenFromInput("");
|
expectGeneratedTokenFromInput("");
|
||||||
});
|
|
||||||
|
|
||||||
it("generates random token when token param is whitespace only", () => {
|
|
||||||
expectGeneratedTokenFromInput(" ");
|
expectGeneratedTokenFromInput(" ");
|
||||||
});
|
|
||||||
|
|
||||||
it('generates random token when token param is the literal string "undefined"', () => {
|
|
||||||
expectGeneratedTokenFromInput("undefined");
|
expectGeneratedTokenFromInput("undefined");
|
||||||
});
|
|
||||||
|
|
||||||
it('generates random token when token param is the literal string "null"', () => {
|
|
||||||
expectGeneratedTokenFromInput("null", "null");
|
expectGeneratedTokenFromInput("null", "null");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user