databus_test.go 737 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package share
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestSharePubStatDatabus(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. aid = int64(1)
  11. share = int(1)
  12. )
  13. convey.Convey("PubStatDatabus", t, func(ctx convey.C) {
  14. err := d.PubStatDatabus(c, aid, share)
  15. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. })
  18. })
  19. }
  20. func TestSharePubShare(t *testing.T) {
  21. var (
  22. c = context.TODO()
  23. aid = int64(1)
  24. mid = int64(1)
  25. ip = "127.0.0.1"
  26. )
  27. convey.Convey("PubShare", t, func(ctx convey.C) {
  28. err := d.PubShare(c, aid, mid, ip)
  29. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  30. ctx.So(err, convey.ShouldBeNil)
  31. })
  32. })
  33. }