新增(接单平台): 增加冻结账号售后微信提示

This commit is contained in:
2026-11-24 19:54:23 +08:00
parent be1b88ac6b
commit f777c95235
15 changed files with 608 additions and 3 deletions
+28
View File
@@ -98,3 +98,31 @@ test('履约状态集成接口要求密钥并接受空快照', async () => {
await once(server, 'close')
}
})
test('售后微信公开接口无需登录且关闭时不泄露联系方式', async () => {
const startupState = createStartupState()
startupState.core.ready = true
const config = createDefaultRuntimeConfig('/tmp/order-site')
const server = createApp({
startupState,
isShutdownStarted: () => false,
config,
}).listen(0, '127.0.0.1')
await once(server, 'listening')
try {
const address = server.address()
assert.ok(address && typeof address === 'object')
const response = await fetch(`http://127.0.0.1:${address.port}/api/v1/worker/support-contact`)
assert.equal(response.status, 200)
assert.equal(response.headers.get('cache-control'), 'no-store')
assert.deepEqual((await response.json()).data, {
enabled: false,
wechatId: '',
wechatQrCodeImage: null,
notice: '',
})
} finally {
server.close()
await once(server, 'close')
}
})