蛋蛋星球 后台端
 
 
 
 

36 lines
581 B

  1. package test
  2. import (
  3. "applet/app/db"
  4. "applet/app/lib/taoke"
  5. "applet/app/svc"
  6. "fmt"
  7. "testing"
  8. )
  9. func TestBrandList(t *testing.T) {
  10. tkBrandStruct, err := taoke.BrandList("1", "20")
  11. if err != nil {
  12. t.Error(err)
  13. }
  14. for _, brandStruct := range *tkBrandStruct {
  15. fmt.Println(brandStruct)
  16. }
  17. }
  18. func TestSuperCategory(t *testing.T) {
  19. category, err := taoke.SuperCategory()
  20. if err != nil {
  21. t.Error(err)
  22. }
  23. for _, brandStruct := range *category {
  24. fmt.Println(brandStruct)
  25. }
  26. }
  27. func TestAddBrandDB(t *testing.T) {
  28. engine := db.DBs["123456"]
  29. svc.AddBrandDB(engine)
  30. }