mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-29 23:55:51 +08:00
Feat: after uploading hooks and checks
This commit is contained in:
20
models/folder_test.go
Normal file
20
models/folder_test.go
Normal file
@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetFolderByPath(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
|
||||
//policyRows := sqlmock.NewRows([]string{"id", "name"}).
|
||||
// AddRow(1, "默认上传策略")
|
||||
//mock.ExpectQuery("^SELECT (.+)").WillReturnRows(policyRows)
|
||||
|
||||
folder,_ := GetFolderByPath("/测试/test",1)
|
||||
fmt.Println(folder)
|
||||
asserts.NoError(mock.ExpectationsWereMet())
|
||||
asserts.NoError(mock.)
|
||||
}
|
||||
Reference in New Issue
Block a user