ut_rank_test.go 476 B

123456789101112131415161718192021222324
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestService_RankTen(t *testing.T) {
  8. convey.Convey("RankTen", t, func() {
  9. _, err := svr.RankTen(context.Background(), "desc")
  10. convey.So(err, convey.ShouldBeNil)
  11. })
  12. }
  13. func TestService_UserRank(t *testing.T) {
  14. username := "hedan"
  15. convey.Convey("UserRank", t, func() {
  16. _, err := svr.UserRank(context.Background(), username)
  17. convey.So(err, convey.ShouldBeNil)
  18. })
  19. }