databus_test.go 653 B

12345678910111213141516171819202122232425262728293031
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/service/main/share/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoPubShare(t *testing.T) {
  9. convey.Convey("PubShare", t, func(ctx convey.C) {
  10. p := &model.ShareParams{
  11. OID: int64(1),
  12. MID: int64(1),
  13. TP: int(3),
  14. }
  15. err := d.PubShare(context.Background(), p)
  16. convey.So(err, convey.ShouldBeNil)
  17. })
  18. }
  19. func TestDaoPubStatShare(t *testing.T) {
  20. convey.Convey("PubStatShare", t, func(ctx convey.C) {
  21. oid := int64(1)
  22. count := int64(666)
  23. err := d.PubStatShare(context.Background(), model.ArchiveMsgTyp, oid, count)
  24. convey.So(err, convey.ShouldBeNil)
  25. })
  26. }