mixed_test.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package cms
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestCmsMixedFilter(t *testing.T) {
  8. var (
  9. ctx = context.Background()
  10. sids = []int64{}
  11. aids = []int64{}
  12. )
  13. convey.Convey("MixedFilter", t, func(c convey.C) {
  14. okSids, okAids := d.MixedFilter(ctx, sids, aids)
  15. c.Convey("Then okSids,okAids should not be nil.", func(c convey.C) {
  16. c.So(okAids, convey.ShouldNotBeNil)
  17. c.So(okSids, convey.ShouldNotBeNil)
  18. })
  19. })
  20. }
  21. func TestCmsaidsFilter(t *testing.T) {
  22. var (
  23. ctx = context.Background()
  24. aids = []int64{}
  25. )
  26. convey.Convey("aidsFilter", t, func(c convey.C) {
  27. okAids := d.aidsFilter(ctx, aids)
  28. c.Convey("Then okAids should not be nil.", func(c convey.C) {
  29. c.So(okAids, convey.ShouldNotBeNil)
  30. })
  31. })
  32. }
  33. func TestCmssidsFilter(t *testing.T) {
  34. var (
  35. ctx = context.Background()
  36. sids = []int64{}
  37. )
  38. convey.Convey("sidsFilter", t, func(c convey.C) {
  39. okSids := d.sidsFilter(ctx, sids)
  40. c.Convey("Then okSids should not be nil.", func(c convey.C) {
  41. c.So(okSids, convey.ShouldNotBeNil)
  42. })
  43. })
  44. }