35 lines
568 B
Go
Executable File
35 lines
568 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"backend/common/service/model"
|
|
"backend/pkg/pg"
|
|
"backend/providers/wechat"
|
|
|
|
"git.ipao.vip/rogeecn/atom"
|
|
"github.com/jinzhu/copier"
|
|
)
|
|
|
|
func Test_GenModel(t *testing.T) {
|
|
err := atom.Serve(model.Options()...)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func Test_GenModel2(t *testing.T) {
|
|
token := &wechat.AuthorizeAccessToken{
|
|
AccessToken: "123",
|
|
RefreshToken: "123",
|
|
ExpiresIn: 123,
|
|
Openid: "123",
|
|
Scope: "123",
|
|
}
|
|
|
|
var oauthInfo pg.UserOAuth
|
|
copier.Copy(&oauthInfo, token)
|
|
|
|
t.Logf("%+v", oauthInfo)
|
|
}
|