databus_test.go 514 B

12345678910111213141516171819202122232425262728
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/service/main/history/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoAddHistoryMessage(t *testing.T) {
  9. var (
  10. c = context.Background()
  11. k = int(1)
  12. msg = []*model.Merge{{
  13. Mid: 1,
  14. Bid: 4,
  15. Time: 10000,
  16. }}
  17. )
  18. convey.Convey("AddHistoryMessage", t, func(ctx convey.C) {
  19. err := d.AddHistoryMessage(c, k, msg)
  20. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  21. ctx.So(err, convey.ShouldBeNil)
  22. })
  23. })
  24. }