summaryrefslogtreecommitdiffstats
path: root/api4/apitestlib.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/apitestlib.go')
-rw-r--r--api4/apitestlib.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/api4/apitestlib.go b/api4/apitestlib.go
index 652a8f882..6a717faf1 100644
--- a/api4/apitestlib.go
+++ b/api4/apitestlib.go
@@ -444,6 +444,17 @@ func (me *TestHelper) CreateMessagePostWithClient(client *model.Client4, channel
return rpost
}
+func (me *TestHelper) CreateMessagePostNoClient(channel *model.Channel, message string, createAtTime int64) *model.Post {
+ post := store.Must(me.App.Srv.Store.Post().Save(&model.Post{
+ UserId: me.BasicUser.Id,
+ ChannelId: channel.Id,
+ Message: message,
+ CreateAt: createAtTime,
+ })).(*model.Post)
+
+ return post
+}
+
func (me *TestHelper) LoginBasic() {
me.LoginBasicWithClient(me.Client)
}