23 lines
353 B
Go
23 lines
353 B
Go
package model
|
|
|
|
import (
|
|
"drive-linked/pkg/dao"
|
|
"testing"
|
|
)
|
|
|
|
func TestUser_GetWithConditions(t *testing.T) {
|
|
dao.Conn()
|
|
|
|
var user User
|
|
// 存在的用户
|
|
conditions := &map[string]interface{}{
|
|
"name": "eigeen",
|
|
"email": "375109735@qq.com",
|
|
}
|
|
err := user.GetProfileWithConditions(conditions)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Log(user)
|
|
}
|