go-common/app/job/main/app-wall/dao/offer/dao_test.go

37 lines
542 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package offer
import (
"context"
"flag"
"path/filepath"
"testing"
"time"
. "github.com/smartystreets/goconvey/convey"
"go-common/app/job/main/app-wall/conf"
)
var (
d *Dao
)
func ctx() context.Context {
return context.Background()
}
func init() {
dir, _ := filepath.Abs("../../cmd/app-wall-job-test.toml")
flag.Set("conf", dir)
conf.Init()
d = New(conf.Conf)
time.Sleep(time.Second)
}
func TestActive(t *testing.T) {
Convey("Active", t, func() {
err := d.Active(ctx(), "", "", "", "", "")
So(err, ShouldBeNil)
})
}