You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
package dao |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
"time" |
|
|
|
"github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func TestDaoTryLockReviewNotify(t *testing.T) { |
|
convey.Convey("TryLockReviewNotify", t, func() { |
|
now := time.Now() |
|
no := time.Date(2018, 1, 7, 20, now.Minute(), now.Second(), 651387237, time.UTC) |
|
p1, err := d.TryLockReviewNotify(context.Background(), no) |
|
convey.So(err, convey.ShouldBeNil) |
|
convey.So(p1, convey.ShouldNotBeNil) |
|
}) |
|
} |
|
|
|
//func TestDaoreviewAuditNotifyLockKey(t *testing.T) { |
|
// convey.Convey("reviewAuditNotifyLockKey", t, func(ctx convey.C) { |
|
// var ( |
|
// no = time.Now() |
|
// ) |
|
// ctx.Convey("When everything goes positive", func(ctx convey.C) { |
|
// p1 := reviewAuditNotifyLockKey(no) |
|
// ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) { |
|
// ctx.So(p1, convey.ShouldNotBeNil) |
|
// }) |
|
// }) |
|
// }) |
|
//} |
|
// |
|
//func TestDaopingRedis(t *testing.T) { |
|
// convey.Convey("pingRedis", t, func(ctx convey.C) { |
|
// var ( |
|
// c = context.Background() |
|
// ) |
|
// ctx.Convey("When everything goes positive", func(ctx convey.C) { |
|
// err := d.pingRedis(c) |
|
// ctx.Convey("Then err should be nil.", func(ctx convey.C) { |
|
// ctx.So(err, convey.ShouldBeNil) |
|
// }) |
|
// }) |
|
// }) |
|
//}
|
|
|