mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-09 00:20:26 +08:00
路由规则找不到的时候提示用户
This commit is contained in:
@@ -4,6 +4,7 @@ package utils_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/utils"
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -23,3 +24,12 @@ func TestJSONClone(t *testing.T) {
|
||||
t.Logf("%p, %#v", c, c)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestJSONIsNull(t *testing.T) {
|
||||
var a = assert.NewAssertion(t)
|
||||
a.IsTrue(utils.JSONIsNull(nil))
|
||||
a.IsTrue(utils.JSONIsNull([]byte{}))
|
||||
a.IsTrue(utils.JSONIsNull([]byte("null")))
|
||||
a.IsFalse(utils.JSONIsNull([]byte{1, 2, 3}))
|
||||
}
|
||||
Reference in New Issue
Block a user