2024-11-15 15:05:54 +08:00
|
|
|
package test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"catface/app/model"
|
2024-11-23 01:30:13 +08:00
|
|
|
_ "catface/bootstrap"
|
2024-11-15 15:05:54 +08:00
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestDocModel(t *testing.T) {
|
|
|
|
Init()
|
|
|
|
|
|
|
|
doc := model.Doc{}
|
|
|
|
err := DB.AutoMigrate(&doc)
|
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
}
|
2024-11-23 01:30:13 +08:00
|
|
|
|
|
|
|
func TestAnmBreed(t *testing.T) {
|
|
|
|
res := model.CreateAnmBreedFactory("").GetNameZhByEn("li")
|
|
|
|
t.Log(res)
|
|
|
|
}
|