del_video_test.go 513 B

1234567891011121314151617181920212223
  1. package ugc
  2. import (
  3. "testing"
  4. "fmt"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDao_DeletedVideos(t *testing.T) {
  8. Convey("TestDao_DeletedVideos", t, WithDao(func(d *Dao) {
  9. res, err := d.DeletedVideos(ctx)
  10. if err == nil && len(res) == 0 {
  11. fmt.Println("No Delete Data")
  12. d.DB.Exec(ctx, "UPDATE ugc_video SET deleted = 1, submit =1 WHERE deleted = 0 LIMIT 1")
  13. }
  14. res, err = d.DeletedVideos(ctx)
  15. So(err, ShouldBeNil)
  16. So(len(res), ShouldBeGreaterThan, 0)
  17. fmt.Println(res)
  18. }))
  19. }