mysql_dm_special_test.go 878 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoUpsertDmSpecialLocation(t *testing.T) {
  8. convey.Convey("UpsertDmSpecialLocation", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. tp = int32(0)
  12. oid = int64(0)
  13. locations = ""
  14. )
  15. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  16. err := testDao.UpsertDmSpecialLocation(c, tp, oid, locations)
  17. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  18. ctx.So(err, convey.ShouldBeNil)
  19. })
  20. })
  21. })
  22. }
  23. func TestDaoDMSpecialLocations(t *testing.T) {
  24. convey.Convey("DMSpecialLocations", t, func(ctx convey.C) {
  25. var (
  26. c = context.Background()
  27. tp = int32(1)
  28. oid = int64(0)
  29. )
  30. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  31. testDao.DMSpecialLocations(c, tp, oid)
  32. })
  33. })
  34. }