video_test.go 982 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package archive
  2. import (
  3. "context"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "testing"
  6. )
  7. func TestDao_VideoByID(t *testing.T) {
  8. Convey("VideoByID", t, WithDao(func(d *Dao) {
  9. _, err := d.VideoByID(context.Background(), 1)
  10. So(err, ShouldBeNil)
  11. }))
  12. }
  13. func TestDao_VideosByAid(t *testing.T) {
  14. Convey("VideosByAid", t, WithDao(func(d *Dao) {
  15. _, err := d.VideosByAid(context.Background(), 1)
  16. So(err, ShouldBeNil)
  17. }))
  18. }
  19. func TestDao_VideoByIDs(t *testing.T) {
  20. Convey("VideoByIDs", t, WithDao(func(d *Dao) {
  21. _, err := d.VideoByIDs(context.Background(), []int64{1, 2})
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func Test_VideoStateMap(t *testing.T) {
  26. Convey("test archive", t, WithDao(func(d *Dao) {
  27. _, err := d.VideoStateMap(context.Background(), []int64{1, 2})
  28. So(err, ShouldBeNil)
  29. }))
  30. }
  31. func Test_VideoAidMap(t *testing.T) {
  32. Convey("test archive", t, WithDao(func(d *Dao) {
  33. _, err := d.VideoAidMap(context.Background(), []int64{1, 2})
  34. So(err, ShouldBeNil)
  35. }))
  36. }