Test: new changes in pkg request, serializer, task, xml, router

This commit is contained in:
HFO4
2022-03-31 20:17:01 +08:00
parent d117080991
commit ec776ac837
9 changed files with 26 additions and 285 deletions

View File

@@ -0,0 +1,15 @@
package serializer
import (
model "github.com/cloudreve/Cloudreve/v3/models"
"github.com/stretchr/testify/assert"
"testing"
)
func TestBuildObjectList(t *testing.T) {
a := assert.New(t)
res := BuildObjectList(1, []Object{{}, {}}, &model.Policy{})
a.NotEmpty(res.Parent)
a.NotNil(res.Policy)
a.Len(res.Objects, 2)
}