del_arc_test.go 712 B

1234567891011121314151617181920212223242526272829303132333435
  1. package ugc
  2. import (
  3. "fmt"
  4. "go-common/library/database/sql"
  5. "testing"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDao_DeletedArc(t *testing.T) {
  9. Convey("TestDao_DeletedArc", t, WithDao(func(d *Dao) {
  10. res, err := d.DeletedArc(ctx)
  11. if err == sql.ErrNoRows {
  12. fmt.Println("No to delete data")
  13. return
  14. }
  15. So(err, ShouldBeNil)
  16. So(res, ShouldBeGreaterThan, 0)
  17. }))
  18. }
  19. func TestDao_PpDelArc(t *testing.T) {
  20. Convey("TestDao_PpDelArc", t, WithDao(func(d *Dao) {
  21. err := d.PpDelArc(ctx, 333)
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func TestDao_FinishDelArc(t *testing.T) {
  26. Convey("TestDao_FinishDelArc", t, WithDao(func(d *Dao) {
  27. err := d.FinishDelArc(ctx, 333)
  28. So(err, ShouldBeNil)
  29. }))
  30. }