match_test.go 599 B

123456789101112131415161718192021222324252627
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/esports/model"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestService_AddMatch(t *testing.T) {
  9. Convey("test add match", t, WithService(func(s *Service) {
  10. gids := []int64{1}
  11. err := s.AddMatch(context.Background(), &model.Match{Title: "match"}, gids)
  12. So(err, ShouldBeNil)
  13. }))
  14. }
  15. func TestService_ForbidMatch(t *testing.T) {
  16. Convey("test forbid match", t, WithService(func(s *Service) {
  17. mid := int64(1)
  18. state := 0
  19. err := s.ForbidMatch(context.Background(), mid, state)
  20. So(err, ShouldBeNil)
  21. }))
  22. }