mysql_test.go 523 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoParam(t *testing.T) {
  9. convey.Convey("Param", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. )
  13. time.Sleep(time.Second)
  14. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  15. param, err := d.Param(c)
  16. ctx.Convey("Then err should be nil.param should not be nil.", func(ctx convey.C) {
  17. ctx.So(err, convey.ShouldBeNil)
  18. ctx.So(param, convey.ShouldNotBeNil)
  19. })
  20. })
  21. })
  22. }