mirror of https://github.com/openclaw/openclaw.git
test: dedupe feishu media account setup
This commit is contained in:
parent
b213348665
commit
8ca510a669
|
|
@ -64,18 +64,21 @@ function expectMediaTimeoutClientConfigured(): void {
|
|||
);
|
||||
}
|
||||
|
||||
function mockResolvedFeishuAccount() {
|
||||
resolveFeishuAccountMock.mockReturnValue({
|
||||
configured: true,
|
||||
accountId: "main",
|
||||
config: {},
|
||||
appId: "app_id",
|
||||
appSecret: "app_secret",
|
||||
domain: "feishu",
|
||||
});
|
||||
}
|
||||
|
||||
describe("sendMediaFeishu msg_type routing", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
resolveFeishuAccountMock.mockReturnValue({
|
||||
configured: true,
|
||||
accountId: "main",
|
||||
config: {},
|
||||
appId: "app_id",
|
||||
appSecret: "app_secret",
|
||||
domain: "feishu",
|
||||
});
|
||||
mockResolvedFeishuAccount();
|
||||
|
||||
normalizeFeishuTargetMock.mockReturnValue("ou_target");
|
||||
resolveReceiveIdTypeMock.mockReturnValue("open_id");
|
||||
|
|
@ -483,15 +486,7 @@ describe("sanitizeFileNameForUpload", () => {
|
|||
describe("downloadMessageResourceFeishu", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
resolveFeishuAccountMock.mockReturnValue({
|
||||
configured: true,
|
||||
accountId: "main",
|
||||
config: {},
|
||||
appId: "app_id",
|
||||
appSecret: "app_secret",
|
||||
domain: "feishu",
|
||||
});
|
||||
mockResolvedFeishuAccount();
|
||||
|
||||
createFeishuClientMock.mockReturnValue({
|
||||
im: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue