mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
17 lines
280 B
Go
17 lines
280 B
Go
package mon
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"go.mongodb.org/mongo-driver/v2/mongo"
|
|
)
|
|
|
|
func TestClientManger_getClient(t *testing.T) {
|
|
c := &mongo.Client{}
|
|
Inject("foo", c)
|
|
cli, err := getClient("foo")
|
|
assert.Nil(t, err)
|
|
assert.Equal(t, c, cli)
|
|
}
|