yao/socket/socket_test.go
2022-07-17 08:22:50 +08:00

23 lines
371 B
Go

package socket
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/yaoapp/gou"
"github.com/yaoapp/yao/config"
)
func TestLoad(t *testing.T) {
Load(config.Conf)
LoadFrom("not a path", "404.")
check(t)
}
func check(t *testing.T) {
keys := []string{}
for key := range gou.Sockets {
keys = append(keys, key)
}
assert.Equal(t, 2, len(keys))
}