history_test.go 879 B

1234567891011121314151617181920212223242526272829303132333435
  1. package archive
  2. import (
  3. "context"
  4. "github.com/smartystreets/goconvey/convey"
  5. "testing"
  6. "time"
  7. )
  8. func Test_historyByAID(t *testing.T) {
  9. convey.Convey("根据aid获取稿件编辑历史", t, WithDao(func(d *Dao) {
  10. aid := int64(10107879)
  11. h, err := d.HistoryByAID(context.TODO(), aid, time.Now().Add(720*-1*time.Hour))
  12. for _, o := range h {
  13. t.Logf("%+v", o)
  14. }
  15. convey.So(err, convey.ShouldBeNil)
  16. }))
  17. }
  18. func Test_historyByID(t *testing.T) {
  19. convey.Convey("根据id获取稿件编辑历史", t, WithDao(func(d *Dao) {
  20. hid := int64(1)
  21. _, err := d.HistoryByID(context.TODO(), hid)
  22. convey.So(err, convey.ShouldBeNil)
  23. }))
  24. }
  25. func Test_videoHistoryByHID(t *testing.T) {
  26. convey.Convey("根据id获取分p编辑历史", t, WithDao(func(d *Dao) {
  27. hid := int64(1)
  28. _, err := d.VideoHistoryByHID(context.TODO(), hid)
  29. convey.So(err, convey.ShouldBeNil)
  30. }))
  31. }