game_test.go 437 B

123456789101112131415161718192021
  1. package service
  2. import (
  3. "context"
  4. "encoding/json"
  5. "testing"
  6. "go-common/app/admin/main/esports/model"
  7. . "github.com/smartystreets/goconvey/convey"
  8. )
  9. func TestService_GameList(t *testing.T) {
  10. Convey("test game list", t, WithService(func(s *Service) {
  11. oids := []int64{21, 16}
  12. data, err := s.gameList(context.Background(), model.TypeTeam, oids)
  13. So(err, ShouldBeNil)
  14. bs, _ := json.Marshal(data)
  15. Printf(string(bs))
  16. }))
  17. }