event_test.go 485 B

123456789101112131415161718192021222324
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/reply/model"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestEvent(t *testing.T) {
  9. var (
  10. mid = int64(1)
  11. sub = &model.Subject{}
  12. rp = &model.Reply{Content: &model.ReplyContent{}}
  13. report = &model.Report{}
  14. c = context.Background()
  15. )
  16. Convey("pub a event", t, WithDao(func(d *Dao) {
  17. err := d.PubEvent(c, model.EventReportAdd, mid, sub, rp, report)
  18. So(err, ShouldBeNil)
  19. }))
  20. }