parent
0dddc12609
commit
aa17aa8e6a
@ -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.)
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package filesystem
|
||||
|
||||
type key int
|
||||
|
||||
const (
|
||||
// GinCtx Gin的上下文
|
||||
GinCtx key = iota
|
||||
// SavePathCtx 文件物理路径
|
||||
SavePathCtx
|
||||
// FileCtx 上传的文件
|
||||
FileCtx
|
||||
)
|
Loading…
Reference in new issue