chore(repo): reinitialize repository
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package httpapi
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"inbox/internal/domain/workflow"
|
||||
)
|
||||
|
||||
func TestWorkflowRunResponseIncludesPlanning(t *testing.T) {
|
||||
resp := workflowRunResponse(workflow.Run{
|
||||
ID: "run_1",
|
||||
WorkspaceID: "ws_1",
|
||||
TopicID: "topic_1",
|
||||
RoleName: "leader",
|
||||
Stage: workflow.StagePlan,
|
||||
Mode: "message",
|
||||
Status: workflow.RunStatusSucceeded,
|
||||
CommandJSON: `{"mode":"leader","planning":{"plan_mode":"patch","execution_mode":"plan_and_start"}}`,
|
||||
})
|
||||
|
||||
planning, ok := resp["planning"].(map[string]any)
|
||||
if !ok {
|
||||
t.Fatalf("expected planning payload, got %#v", resp["planning"])
|
||||
}
|
||||
if planning["plan_mode"] != "patch" {
|
||||
t.Fatalf("expected plan_mode=patch, got %#v", planning["plan_mode"])
|
||||
}
|
||||
if planning["execution_mode"] != "plan_and_start" {
|
||||
t.Fatalf("expected execution_mode=plan_and_start, got %#v", planning["execution_mode"])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user