rpc_test.go 845 B

1234567891011121314151617181920212223242526272829303132333435
  1. package card
  2. import (
  3. "context"
  4. "github.com/smartystreets/goconvey/convey"
  5. "testing"
  6. )
  7. func TestListVideoArchive(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. avids = []int64{31908629}
  11. )
  12. convey.Convey("Info", t, func(ctx convey.C) {
  13. videos, err := d.ListVideoArchive(c, avids)
  14. ctx.Convey("Then err should be nil.videos should not be nil.", func(ctx convey.C) {
  15. ctx.So(err, convey.ShouldBeNil)
  16. ctx.So(videos, convey.ShouldNotBeNil)
  17. })
  18. })
  19. }
  20. func TestAvidVideoMap(t *testing.T) {
  21. var (
  22. c = context.TODO()
  23. avids = []int64{31908629}
  24. )
  25. convey.Convey("Info", t, func(ctx convey.C) {
  26. avidVideoMap, err := d.AvidVideoMap(c, avids)
  27. ctx.Convey("Then err should be nil.midVideosMap should not be nil.", func(ctx convey.C) {
  28. ctx.So(err, convey.ShouldBeNil)
  29. ctx.So(avidVideoMap, convey.ShouldNotBeNil)
  30. })
  31. })
  32. }