Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package service
import (
"context"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestService_Business(t *testing.T) {
c := context.Background()
Convey("test service business", c, WithService(func(s *Service) {
Convey("test service add business", c, WithService(func(s *Service) {
_, err := s.AddBusiness(c, -3, "abc", "abc", "abc", "abc")
So(err, ShouldBeNil)
}))
Convey("test service list business", c, WithService(func(s *Service) {
_, err := s.ListBusiness(c, 0)
So(err, ShouldBeNil)
}))
Convey("test service update business", c, WithService(func(s *Service) {
_, err := s.UpBusiness(c, "test", "test", "test", "abc", -3)
So(err, ShouldBeNil)
}))
Convey("test service update business state", c, WithService(func(s *Service) {
_, err := s.UpBusinessState(c, 1, -3)
So(err, ShouldBeNil)
}))
}))
}