credit_log_test.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package upcrmservice
  2. import (
  3. "context"
  4. "go-common/app/admin/main/up/model/upcrmmodel"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestUpcrmserviceformatLog(t *testing.T) {
  9. convey.Convey("formatLog", t, func(ctx convey.C) {
  10. var (
  11. log upcrmmodel.SimpleCreditLogWithContent
  12. )
  13. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  14. result := formatLog(log)
  15. ctx.Convey("Then result should not be nil.", func(ctx convey.C) {
  16. ctx.So(result, convey.ShouldNotBeNil)
  17. })
  18. })
  19. })
  20. }
  21. func TestUpcrmserviceCreditLogQueryUp(t *testing.T) {
  22. convey.Convey("CreditLogQueryUp", t, func(ctx convey.C) {
  23. var (
  24. context = context.Background()
  25. arg = &upcrmmodel.CreditLogQueryArgs{}
  26. )
  27. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  28. result, err := s.CreditLogQueryUp(context, arg)
  29. ctx.Convey("Then err should be nil.result should not be nil.", func(ctx convey.C) {
  30. ctx.So(err, convey.ShouldBeNil)
  31. ctx.So(result, convey.ShouldNotBeNil)
  32. })
  33. })
  34. })
  35. }