github.com/cloudreve/Cloudreve/v3@v3.0.0-20240224133659-3edb00a6484c/pkg/serializer/explorer_test.go (about)

     1  package serializer
     2  
     3  import (
     4  	model "github.com/cloudreve/Cloudreve/v3/models"
     5  	"github.com/stretchr/testify/assert"
     6  	"testing"
     7  )
     8  
     9  func TestBuildObjectList(t *testing.T) {
    10  	a := assert.New(t)
    11  	res := BuildObjectList(1, []Object{{}, {}}, &model.Policy{})
    12  	a.NotEmpty(res.Parent)
    13  	a.NotNil(res.Policy)
    14  	a.Len(res.Objects, 2)
    15  }