package relay import ( "testing" "github.com/QuantumNous/new-api/constant" "github.com/QuantumNous/new-api/model" "github.com/stretchr/testify/assert" ) func TestTaskModel2DtoNormalizesLegacyAction(t *testing.T) { task := &model.Task{Action: "firstTailGenerate"} dtoTask := TaskModel2Dto(task) assert.Equal(t, constant.TaskActionFirstTailToVideo, dtoTask.Action) assert.Equal(t, "firstTailGenerate", task.Action) }