Feat: User/Me

This commit is contained in:
HFO4
2019-11-12 15:34:54 +08:00
parent 80f30465e9
commit 589c399488
9 changed files with 148 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
package middleware
import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
"testing"
)
func TestSession(t *testing.T) {
asserts := assert.New(t)
handler := Session("2333")
asserts.NotNil(handler)
asserts.NotNil(Store)
asserts.IsType(emptyFunc(), handler)
}
func emptyFunc() gin.HandlerFunc {
return func(c *gin.Context) {}
}