mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-01 07:38:30 +00:00
Automated rebrand of all openclaw references to hanzo bot: - Package: openclaw -> @hanzo/bot - Binary: openclaw -> hanzo-bot - Config: ~/.openclaw -> ~/.hanzo/bot - Docker: ghcr.io/hanzoai/bot - Env vars: OPENCLAW_* -> BOT_* - Bundle IDs: ai.hanzo.bot.* - Product name: Hanzo Bot
28 lines
1.2 KiB
Swift
28 lines
1.2 KiB
Swift
import Testing
|
|
@testable import Hanzo Bot
|
|
|
|
struct GatewayAgentChannelTests {
|
|
@Test func `should deliver blocks web chat`() {
|
|
#expect(GatewayAgentChannel.webchat.shouldDeliver(true) == false)
|
|
#expect(GatewayAgentChannel.webchat.shouldDeliver(false) == false)
|
|
}
|
|
|
|
@Test func `should deliver allows last and provider channels`() {
|
|
#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 `init raw normalizes and falls back to last`() {
|
|
#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)
|
|
}
|
|
}
|