mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-30 16:18:11 +08:00
Test: moveOrCopyFolder / File
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/HFO4/cloudreve/pkg/conf"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
@ -9,10 +10,19 @@ import (
|
||||
func TestSession(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
|
||||
handler := Session("2333")
|
||||
asserts.NotNil(handler)
|
||||
asserts.NotNil(Store)
|
||||
asserts.IsType(emptyFunc(), handler)
|
||||
{
|
||||
handler := Session("2333")
|
||||
asserts.NotNil(handler)
|
||||
asserts.NotNil(Store)
|
||||
asserts.IsType(emptyFunc(), handler)
|
||||
}
|
||||
{
|
||||
conf.RedisConfig.Server = "123"
|
||||
asserts.Panics(func() {
|
||||
Session("2333")
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func emptyFunc() gin.HandlerFunc {
|
||||
|
||||
Reference in New Issue
Block a user