|
1234567891011121314151617181920212223242526272829303132333435 |
- package test
-
- import (
- "applet/app/db"
- "applet/app/lib/taoke"
- "applet/app/svc"
- "fmt"
- "testing"
- )
-
- func TestBrandList(t *testing.T) {
- tkBrandStruct, err := taoke.BrandList("1", "20")
- if err != nil {
- t.Error(err)
- }
- for _, brandStruct := range *tkBrandStruct {
- fmt.Println(brandStruct)
- }
-
- }
-
- func TestSuperCategory(t *testing.T) {
- category, err := taoke.SuperCategory()
- if err != nil {
- t.Error(err)
- }
- for _, brandStruct := range *category {
- fmt.Println(brandStruct)
- }
- }
-
- func TestAddBrandDB(t *testing.T) {
- engine := db.DBs["123456"]
- svc.AddBrandDB(engine)
- }
|