template-monorepo/internal/library/redis/client_test.go

18 lines
354 B
Go
Raw Normal View History

package redis_test
import (
"testing"
redislib "gateway/internal/library/redis"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/zeromicro/go-zero/core/stores/redis"
)
func TestNewClient_EmptyHost(t *testing.T) {
c, err := redislib.NewClient(redis.RedisConf{})
require.NoError(t, err)
assert.Nil(t, c)
}