mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Comprehensive rename of all openclaw references to hanzo-bot equivalents: - Package: openclaw → @hanzo/bot - Binary: openclaw → hanzo-bot - Types: OpenClaw* → Bot* - Env vars: OPENCLAW_* → BOT_* - Android: ai.openclaw.android → ai.hanzo.bot.android - iOS/macOS: ai.openclaw.* → ai.hanzo.* - Swift modules: OpenClaw* → Bot* - Plugins: openclaw.plugin.json → bot.plugin.json - Paths: .openclaw/ → .hanzo/bot/ - URLs: github.com/openclaw → github.com/hanzoai
28 lines
1.2 KiB
Swift
28 lines
1.2 KiB
Swift
import Testing
|
|
@testable import HanzoBot
|
|
|
|
@Suite struct GatewayAgentChannelTests {
|
|
@Test func shouldDeliverBlocksWebChat() {
|
|
#expect(GatewayAgentChannel.webchat.shouldDeliver(true) == false)
|
|
#expect(GatewayAgentChannel.webchat.shouldDeliver(false) == false)
|
|
}
|
|
|
|
@Test func shouldDeliverAllowsLastAndProviderChannels() {
|
|
#expect(GatewayAgentChannel.last.shouldDeliver(true) == true)
|
|
#expect(GatewayAgentChannel.whatsapp.shouldDeliver(true) == true)
|
|
#expect(GatewayAgentChannel.telegram.shouldDeliver(true) == true)
|
|
#expect(GatewayAgentChannel.googlechat.shouldDeliver(true) == true)
|
|
#expect(GatewayAgentChannel.bluebubbles.shouldDeliver(true) == true)
|
|
#expect(GatewayAgentChannel.last.shouldDeliver(false) == false)
|
|
}
|
|
|
|
@Test func initRawNormalizesAndFallsBackToLast() {
|
|
#expect(GatewayAgentChannel(raw: nil) == .last)
|
|
#expect(GatewayAgentChannel(raw: " ") == .last)
|
|
#expect(GatewayAgentChannel(raw: "WEBCHAT") == .webchat)
|
|
#expect(GatewayAgentChannel(raw: "googlechat") == .googlechat)
|
|
#expect(GatewayAgentChannel(raw: "BLUEBUBBLES") == .bluebubbles)
|
|
#expect(GatewayAgentChannel(raw: "unknown") == .last)
|
|
}
|
|
}
|