rank_test.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/interface/main/mcn/model/mcnmodel"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestServiceMcnGetRankUpFans(t *testing.T) {
  9. convey.Convey("McnGetRankUpFans", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. arg = &mcnmodel.McnGetRankReq{}
  13. )
  14. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  15. res, err := s.McnGetRankUpFans(c, arg)
  16. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  17. ctx.So(err, convey.ShouldBeNil)
  18. ctx.So(res, convey.ShouldNotBeNil)
  19. })
  20. })
  21. })
  22. }
  23. func TestServiceMcnGetRankArchiveLikes(t *testing.T) {
  24. convey.Convey("McnGetRankArchiveLikes", t, func(ctx convey.C) {
  25. var (
  26. c = context.Background()
  27. arg = &mcnmodel.McnGetRankReq{}
  28. )
  29. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  30. res, err := s.McnGetRankArchiveLikes(c, arg)
  31. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  32. ctx.So(err, convey.ShouldBeNil)
  33. ctx.So(res, convey.ShouldNotBeNil)
  34. })
  35. })
  36. })
  37. }