feat: 完善养成管理后台功能
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCultivateContentBatchReviewFilter(t *testing.T) {
|
||||
in := &CultivateContentBatchReviewInp{ObjectType: "feed_post", Ids: []string{"123"}, Action: "take_down", Reason: "违规内容"}
|
||||
if err := in.Filter(context.Background()); err != nil {
|
||||
t.Fatalf("Filter returned error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCultivateContentBatchReviewFilterRequiresReason(t *testing.T) {
|
||||
in := &CultivateContentBatchReviewInp{ObjectType: "feed_post", Ids: []string{"123"}, Action: "reject"}
|
||||
if err := in.Filter(context.Background()); err == nil {
|
||||
t.Fatal("expected missing reason error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCultivateReportHandleFilterGovernanceRules(t *testing.T) {
|
||||
in := &CultivateReportHandleInp{Id: "123", Action: "processing", UserAction: "freeze", Reason: "恶意行为"}
|
||||
if err := in.Filter(context.Background()); err == nil {
|
||||
t.Fatal("expected governance action to require resolve")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user