archive_test.go 587 B

1234567891011121314151617181920212223242526272829
  1. package dao
  2. import (
  3. "context"
  4. "encoding/json"
  5. "testing"
  6. "go-common/app/interface/main/space/model"
  7. "github.com/smartystreets/goconvey/convey"
  8. )
  9. func TestDao_ArcSearchList(t *testing.T) {
  10. convey.Convey("test search arc list", t, func(ctx convey.C) {
  11. arg := &model.SearchArg{
  12. Mid: 2,
  13. Tid: 0,
  14. Order: "",
  15. Keyword: "",
  16. Pn: 1,
  17. Ps: 20,
  18. }
  19. data, count, err := d.ArcSearchList(context.Background(), arg)
  20. convey.So(err, convey.ShouldBeNil)
  21. convey.Printf("%d", count)
  22. str, _ := json.Marshal(data)
  23. convey.Printf("%s", string(str))
  24. })
  25. }