creditlog_test.go 618 B

1234567891011121314151617181920212223242526272829303132
  1. package upcrmmodel
  2. import (
  3. "encoding/json"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "go-common/library/time"
  6. "testing"
  7. xtime "time"
  8. )
  9. func Test_Orm(t *testing.T) {
  10. var (
  11. arg = ArgCreditLogAdd{
  12. BusinessType: 1,
  13. Type: 1,
  14. OpType: 2,
  15. Reason: 101,
  16. Mid: 12345,
  17. Oid: 13021,
  18. UID: 1,
  19. Content: "稿件打回",
  20. CTime: time.Time(xtime.Now().Unix()),
  21. Extra: []byte("{ \"key\" : \"value\"}"),
  22. }
  23. )
  24. Convey("orm", t, func() {
  25. Convey("connect", func() {
  26. var js, _ = json.Marshal(arg)
  27. t.Log(string(js))
  28. })
  29. })
  30. }