mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 05:10:42 +00:00
test: tighten codex ci auth payload assertions
This commit is contained in:
@@ -32,10 +32,9 @@ describe("prepare-codex-ci-auth", () => {
|
||||
});
|
||||
|
||||
expect(result.changed).toBe(true);
|
||||
expect(decodeJwtPayload(String(result.auth.tokens?.id_token))).toMatchObject({
|
||||
email: "peter@example.com",
|
||||
chatgpt_account_id: "acct_123",
|
||||
});
|
||||
const payload = decodeJwtPayload(String(result.auth.tokens?.id_token));
|
||||
expect(payload.email).toBe("peter@example.com");
|
||||
expect(payload.chatgpt_account_id).toBe("acct_123");
|
||||
});
|
||||
|
||||
it("leaves current auth metadata unchanged", () => {
|
||||
@@ -77,10 +76,9 @@ describe("prepare-codex-ci-auth", () => {
|
||||
const updated = JSON.parse(await fs.readFile(authPath, "utf-8")) as {
|
||||
tokens?: { id_token?: string };
|
||||
};
|
||||
expect(decodeJwtPayload(String(updated.tokens?.id_token))).toMatchObject({
|
||||
sub: "user",
|
||||
chatgpt_account_id: "acct_123",
|
||||
});
|
||||
const payload = decodeJwtPayload(String(updated.tokens?.id_token));
|
||||
expect(payload.sub).toBe("user");
|
||||
expect(payload.chatgpt_account_id).toBe("acct_123");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user