dao_test.go 559 B

123456789101112131415161718192021222324252627282930313233
  1. package dao
  2. import (
  3. "context"
  4. "flag"
  5. "path/filepath"
  6. "testing"
  7. "go-common/app/admin/main/point/conf"
  8. "go-common/app/admin/main/point/model"
  9. . "github.com/smartystreets/goconvey/convey"
  10. )
  11. var (
  12. d *Dao
  13. )
  14. func init() {
  15. dir, _ := filepath.Abs("../cmd/point-admin.toml")
  16. flag.Set("conf", dir)
  17. conf.Init()
  18. d = New(conf.Conf)
  19. }
  20. func Test_PointHistory(t *testing.T) {
  21. Convey("Test_PointHistory", t, func() {
  22. arg := &model.ArgPointHistory{}
  23. res, err := d.PointHistory(context.TODO(), arg)
  24. So(err, ShouldBeNil)
  25. So(res, ShouldNotBeNil)
  26. })
  27. }