dao_test.go 517 B

123456789101112131415161718192021222324252627282930
  1. package resource
  2. import (
  3. "context"
  4. "flag"
  5. "path/filepath"
  6. "testing"
  7. "go-common/app/interface/main/app-feed/conf"
  8. . "github.com/smartystreets/goconvey/convey"
  9. )
  10. var (
  11. d *Dao
  12. )
  13. func init() {
  14. dir, _ := filepath.Abs("../../cmd/app-feed-test.toml")
  15. flag.Set("conf", dir)
  16. conf.Init()
  17. d = New(conf.Conf)
  18. }
  19. func Test_Banner(t *testing.T) {
  20. Convey("should get banner", t, func() {
  21. _, _, err := d.Banner(context.Background(), 1, 2, 3, "", "", "", "", "", "", true, "", "", "")
  22. So(err, ShouldBeNil)
  23. })
  24. }