reply_test.go 635 B

12345678910111213141516171819202122232425262728293031
  1. package reply
  2. import (
  3. "context"
  4. "flag"
  5. "testing"
  6. "go-common/app/interface/main/account/conf"
  7. "github.com/smartystreets/goconvey/convey"
  8. )
  9. var d *Dao
  10. func init() {
  11. flag.Parse()
  12. flag.Set("conf", "../../cmd/account-interface-example.toml")
  13. if err := conf.Init(); err != nil {
  14. panic(err)
  15. }
  16. d = New(conf.Conf)
  17. }
  18. func TestReplyHistoryList(t *testing.T) {
  19. convey.Convey("ReplyHistoryList", t, func() {
  20. res, err := d.ReplyHistoryList(context.TODO(), 1, "2017-3-21", "2017-3-21", "time", "desc", 1, 50, "access_key", "cookie", "0.0.0.0")
  21. convey.So(err, convey.ShouldBeNil)
  22. convey.So(res, convey.ShouldNotBeNil)
  23. })
  24. }