arhive_history_test.go 859 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package archive
  2. import (
  3. "context"
  4. _ "github.com/go-sql-driver/mysql"
  5. . "github.com/smartystreets/goconvey/convey"
  6. "testing"
  7. "time"
  8. )
  9. func Test_ArchiveHistory(t *testing.T) {
  10. var (
  11. c = context.TODO()
  12. err error
  13. )
  14. Convey("HistoryCount", t, WithDao(func(d *Dao) {
  15. _, err = d.HistoryCount(c, 23333)
  16. So(err, ShouldBeNil)
  17. }))
  18. }
  19. func Test_DelArcEditHistoryBefore(t *testing.T) {
  20. var (
  21. c = context.TODO()
  22. err error
  23. tm time.Time
  24. )
  25. Convey("DelArcEditHistoryBefore", t, WithDao(func(d *Dao) {
  26. _, err = d.DelArcEditHistoryBefore(c, tm, 1)
  27. So(err, ShouldBeNil)
  28. }))
  29. }
  30. func Test_DelArcVideoEditHistoryBefore(t *testing.T) {
  31. var (
  32. c = context.TODO()
  33. err error
  34. tm time.Time
  35. )
  36. Convey("DelArcVideoEditHistoryBefore", t, WithDao(func(d *Dao) {
  37. _, err = d.DelArcVideoEditHistoryBefore(c, tm, 1)
  38. So(err, ShouldBeNil)
  39. }))
  40. }