feat: add DingTalk answer feedback workflow
This commit is contained in:
@@ -2,6 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.zheromiku.top/Weknora/dobotai-platform/internal/audit"
|
||||
@@ -65,3 +67,21 @@ func TestBuildAuditOptionsFixesServerSideTenant(t *testing.T) {
|
||||
t.Fatalf("tenant=%q", repo.tenant)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMainWiresFeedbackIntoDingTalkStream(t *testing.T) {
|
||||
data, err := os.ReadFile("main.go")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
source := string(data)
|
||||
for _, fragment := range []string{
|
||||
`"gitea.zheromiku.top/Weknora/dobotai-platform/internal/feedback"`,
|
||||
`feedback.NewService(dingCfg.TenantKey, "dingtalk", store)`,
|
||||
`dingtalk.NewCardFeedbackHandler(feedbackService)`,
|
||||
`dingtalk.NewStreamClient(dingCfg, handler, feedbackHandler)`,
|
||||
} {
|
||||
if !strings.Contains(source, fragment) {
|
||||
t.Errorf("main feedback wiring missing %q", fragment)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user