fix: accept AI table link cards in settings
This commit is contained in:
@@ -157,6 +157,33 @@ func TestControllerAcceptsTableLinkInNextMessage(t *testing.T) {
|
||||
t.Fatal("setting session must be cleared")
|
||||
}
|
||||
}
|
||||
|
||||
func TestControllerFAQBindingPromptExplainsPermissionsSchemaActivationAndLinkCards(t *testing.T) {
|
||||
r := newMemoryRepo()
|
||||
r.admins["t/a"] = true
|
||||
c := NewController(r)
|
||||
out, err := c.Handle(context.Background(), SettingInput{TenantKey: "t", Channel: "dingtalk", StaffID: "a", Text: "/setting faq", ConversationType: "direct"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, want := range []string{
|
||||
"10分钟",
|
||||
"链接卡片",
|
||||
"机器人应用",
|
||||
"管理员",
|
||||
"标准问题(必填)",
|
||||
"原始问题",
|
||||
"语言",
|
||||
"提问人",
|
||||
"立即激活FAQ写入",
|
||||
"短暂重启DobotAI",
|
||||
"取消",
|
||||
} {
|
||||
if !strings.Contains(out, want) {
|
||||
t.Fatalf("reply=%q must contain %q", out, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
func TestControllerDetectsBootstrapCandidate(t *testing.T) {
|
||||
r := newMemoryRepo()
|
||||
c := NewController(r)
|
||||
|
||||
Reference in New Issue
Block a user