member_test.go 831 B

123456789101112131415161718192021222324252627282930313233343536
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/member/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestMemberList(t *testing.T) {
  9. convey.Convey("MemberList", t, func() {
  10. results, err := s.Members(context.Background(), &model.ArgList{
  11. Keyword: "123",
  12. })
  13. convey.So(err, convey.ShouldBeNil)
  14. convey.So(results, convey.ShouldNotBeNil)
  15. })
  16. }
  17. func TestMemberProfile(t *testing.T) {
  18. convey.Convey("MemberProfile", t, func() {
  19. result, err := s.MemberProfile(context.Background(), 123)
  20. convey.So(err, convey.ShouldBeNil)
  21. convey.So(result, convey.ShouldNotBeNil)
  22. })
  23. }
  24. func TestExpLog(t *testing.T) {
  25. convey.Convey("ExpLog", t, func() {
  26. result, err := s.ExpLog(context.Background(), 123)
  27. convey.So(err, convey.ShouldBeNil)
  28. convey.So(result, convey.ShouldNotBeNil)
  29. })
  30. }