Files
Memoh/internal/server/server_test.go
T
BBQ f376a2abe3 fix(channel): add wechatoa webhook delivery and proxy config (#356)
Unify webhook handling across channel adapters and add the WeChat Official Account channel so inbound routing and replies work without platform-specific handlers. Add adapter-scoped proxy support and stable config field ordering so restricted network environments can deliver WeChat and Telegram messages reliably.
2026-04-10 21:26:11 +08:00

25 lines
535 B
Go

package server
import "testing"
func TestShouldSkipJWT_ChannelWebhookPaths(t *testing.T) {
t.Parallel()
cases := []struct {
path string
want bool
}{
{path: "/channels/feishu/webhook/cfg-1", want: true},
{path: "/channels/wechatoa/webhook/cfg-1", want: true},
{path: "/channels/feishu/webhook", want: false},
{path: "/api/channels/feishu/webhook", want: false},
}
for _, tc := range cases {
got := shouldSkipJWT(tc.path)
if got != tc.want {
t.Fatalf("path=%q want=%v got=%v", tc.path, tc.want, got)
}
}
}