mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 19:54:46 +00:00
test: tighten pairing setup token assertion
This commit is contained in:
@@ -88,19 +88,13 @@ describe("pairing setup code", () => {
|
||||
}
|
||||
expect(resolved.authLabel).toBe(params.authLabel);
|
||||
expect(resolved.payload.bootstrapToken).toBe("bootstrap-123");
|
||||
expect(issueDeviceBootstrapTokenMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
profile: {
|
||||
roles: ["node", "operator"],
|
||||
scopes: [
|
||||
"operator.approvals",
|
||||
"operator.read",
|
||||
"operator.talk.secrets",
|
||||
"operator.write",
|
||||
],
|
||||
},
|
||||
}),
|
||||
);
|
||||
expect(issueDeviceBootstrapTokenMock).toHaveBeenCalledWith({
|
||||
baseDir: undefined,
|
||||
profile: {
|
||||
roles: ["node", "operator"],
|
||||
scopes: ["operator.approvals", "operator.read", "operator.talk.secrets", "operator.write"],
|
||||
},
|
||||
});
|
||||
if (params.url) {
|
||||
expect(resolved.payload.url).toBe(params.url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user