theme_test.go 910 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDao_ThemeInfoByMid(t *testing.T) {
  8. convey.Convey("test theme info by mid", t, func(ctx convey.C) {
  9. mid := int64(545840)
  10. data, err := d.ThemeInfoByMid(context.Background(), mid)
  11. convey.So(err, convey.ShouldBeNil)
  12. for _, v := range data {
  13. convey.Printf("%+v", v)
  14. }
  15. })
  16. }
  17. func TestDao_RawTheme(t *testing.T) {
  18. convey.Convey("test theme", t, func(ctx convey.C) {
  19. mid := int64(545840)
  20. data, err := d.RawTheme(context.Background(), mid)
  21. convey.So(err, convey.ShouldBeNil)
  22. for _, v := range data.List {
  23. convey.Printf("%+v", v)
  24. }
  25. })
  26. }
  27. func TestDao_ThemeActive(t *testing.T) {
  28. convey.Convey("test theme active", t, func(ctx convey.C) {
  29. mid := int64(27515256)
  30. themeID := int64(11)
  31. err := d.ThemeActive(context.Background(), mid, themeID)
  32. convey.So(err, convey.ShouldBeNil)
  33. })
  34. }