test: tighten google chat access assertion · openclaw/openclaw@be43b44
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/googlechat/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -167,18 +167,19 @@ describe("googlechat inbound access policy", () => {
|
167 | 167 | |
168 | 168 | const statusSink = vi.fn(); |
169 | 169 | const logVerbose = vi.fn(); |
| 170 | +const account = { |
| 171 | +accountId: "default", |
| 172 | +config: { |
| 173 | +dm: { policy: "pairing" }, |
| 174 | +}, |
| 175 | +}; |
170 | 176 | |
171 | 177 | vi.useFakeTimers(); |
172 | 178 | vi.setSystemTime(now); |
173 | 179 | try { |
174 | 180 | await expect( |
175 | 181 | applyGoogleChatInboundAccessPolicy({ |
176 | | -account: { |
177 | | -accountId: "default", |
178 | | -config: { |
179 | | -dm: { policy: "pairing" }, |
180 | | -}, |
181 | | -} as never, |
| 182 | +account: account as never, |
182 | 183 | config: { |
183 | 184 | channels: { googlechat: {} }, |
184 | 185 | } as never, |
@@ -197,7 +198,7 @@ describe("googlechat inbound access policy", () => {
|
197 | 198 | |
198 | 199 | expect(issueChallenge).toHaveBeenCalledTimes(1); |
199 | 200 | expect(sendGoogleChatMessage).toHaveBeenCalledWith({ |
200 | | -account: expect.anything(), |
| 201 | + account, |
201 | 202 | space: "spaces/AAA", |
202 | 203 | text: "pairing text", |
203 | 204 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。