academy_test.go 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package academy
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestAcademyArchives(t *testing.T) {
  8. convey.Convey("Archives", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. id = int64(10110127)
  12. bs = int(1)
  13. limit = int(10)
  14. )
  15. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  16. _, err := d.Archives(c, id, bs, limit)
  17. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  18. ctx.So(err, convey.ShouldEqual, err)
  19. })
  20. })
  21. })
  22. }
  23. func TestAcademyUPHotByAIDs(t *testing.T) {
  24. convey.Convey("UPHotByAIDs", t, func(ctx convey.C) {
  25. var (
  26. c = context.Background()
  27. hots = map[int64]int64{
  28. 10110127: 11,
  29. }
  30. )
  31. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  32. err := d.UPHotByAIDs(c, hots)
  33. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  34. ctx.So(err, convey.ShouldEqual, err)
  35. })
  36. })
  37. })
  38. }