main_test.go 294 B

12345678910111213141516171819202122
  1. package main
  2. import (
  3. "context"
  4. "fmt"
  5. "testing"
  6. "youngee_b_api/config"
  7. "youngee_b_api/db"
  8. )
  9. func TestGormUser(t *testing.T) {
  10. ctx := context.Background()
  11. config.Init()
  12. res, err := db.GetUserByPhone(ctx, "123")
  13. if err != nil {
  14. panic(err)
  15. } else {
  16. fmt.Printf("%+v", res)
  17. }
  18. }
  19. //