manual_test.go 922 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package ugc
  2. import (
  3. "fmt"
  4. "testing"
  5. "go-common/app/job/main/tv/model/ugc"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDao_Manual(t *testing.T) {
  9. Convey("TestDao_Manual", t, WithDao(func(d *Dao) {
  10. res, err := d.Manual(ctx)
  11. for _, v := range res {
  12. fmt.Println(v)
  13. }
  14. So(err, ShouldBeNil)
  15. So(len(res), ShouldBeGreaterThan, 0)
  16. }))
  17. }
  18. func TestDao_Ppmnl(t *testing.T) {
  19. Convey("TestDao_Ppmnl", t, WithDao(func(d *Dao) {
  20. err := d.Ppmnl(ctx, 10099763)
  21. So(err, ShouldBeNil)
  22. }))
  23. }
  24. func TestDao_UpdateArc(t *testing.T) {
  25. Convey("TestDao_UpdateArc", t, WithDao(func(d *Dao) {
  26. err := d.UpdateArc(ctx, &ugc.ArchDatabus{
  27. Aid: 10099763,
  28. Mid: 452156,
  29. Videos: 1,
  30. TypeID: 174,
  31. Title: "test",
  32. Cover: "testPic",
  33. Content: "testDesc",
  34. Duration: 300,
  35. Copyright: 1,
  36. PubTime: "2018-06-05",
  37. State: 5,
  38. })
  39. So(err, ShouldBeNil)
  40. }))
  41. }