28 lines
459 B
Go
28 lines
459 B
Go
package db
|
|
|
|
import (
|
|
"fmt"
|
|
"go_dreamfactory/pb"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestFriendAdd(t *testing.T) {
|
|
err := db.Friend_SaveOrUpdate(&pb.Cache_FriendData{
|
|
UserId: "629f159310d6970846f7ef26",
|
|
FriendIds: []string{
|
|
"629f147e3d276120561bfa18",
|
|
},
|
|
})
|
|
|
|
require.Nil(t, err, nil)
|
|
}
|
|
|
|
func TestFriendFindCond(t *testing.T) {
|
|
user := db.Frined_FindCond("乐谷5")
|
|
require.NotNil(t, user, nil)
|
|
|
|
fmt.Printf("%v", user)
|
|
}
|