package main import ( "context" "fmt" "testing" "youngee_b_api/config" "youngee_b_api/model/http_model" "youngee_b_api/service" ) func TestGormUser(t *testing.T) { } func TestDbCreateEnterprise(t *testing.T) { ctx := context.Background() config.Init() newEnterprise := http_model.CreateEnterpriseRequest{ Industry: 2, BusinessName: "Test公司", RealName: "测试员", Phone: "13010101010", Email: "test@younggee.com", } res := service.CreateEnterprise.CreateEnterpriseUser(ctx, newEnterprise) if res != nil { fmt.Printf("%+v\n", res) } else { fmt.Printf("error\n") } }