You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
492 B
25 lines
492 B
package dao |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
"time" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func TestMessage(t *testing.T) { |
|
var ( |
|
mid = int64(1) |
|
title = "test title" |
|
msg = "test msg" |
|
now = time.Now() |
|
c = context.Background() |
|
) |
|
Convey("test send a message", t, WithDao(func(d *Dao) { |
|
d.SendReplyDelMsg(c, mid, title, msg, now) |
|
So(msg, ShouldEqual, "test msg") |
|
d.SendReportAcceptMsg(c, mid, title, msg, now) |
|
So(title, ShouldEqual, "test title") |
|
})) |
|
}
|
|
|