mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-08 10:46:58 +00:00
19 lines
428 B
Go
19 lines
428 B
Go
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)
|
|
}
|