summaryrefslogtreecommitdiffstats
path: root/app/apptestlib.go
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-04-16 14:23:58 +0200
committerJesús Espino <jespinog@gmail.com>2018-04-16 14:23:58 +0200
commitbf24f51c4e1cc6286885460672f7f449e8c6f5ef (patch)
tree147773b452dd017451dcc63f3f752b82d5c7694a /app/apptestlib.go
parent0759cf639d1872680c9fc204cdef91cb784fac72 (diff)
downloadchat-bf24f51c4e1cc6286885460672f7f449e8c6f5ef.tar.gz
chat-bf24f51c4e1cc6286885460672f7f449e8c6f5ef.tar.bz2
chat-bf24f51c4e1cc6286885460672f7f449e8c6f5ef.zip
[MM-9904] Add /invite slash command to invite users to a channel (#8482)
* [MM-9904] Add /invite slash command to invite users to a channel * Update en.json
Diffstat (limited to 'app/apptestlib.go')
-rw-r--r--app/apptestlib.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/apptestlib.go b/app/apptestlib.go
index 6c2273c6e..1b22831c9 100644
--- a/app/apptestlib.go
+++ b/app/apptestlib.go
@@ -218,6 +218,20 @@ func (me *TestHelper) createChannel(team *model.Team, channelType string) *model
return channel
}
+func (me *TestHelper) CreateDmChannel(user *model.User) *model.Channel {
+ utils.DisableDebugLogForTest()
+ var err *model.AppError
+ var channel *model.Channel
+ if channel, err = me.App.CreateDirectChannel(me.BasicUser.Id, user.Id); err != nil {
+ l4g.Error(err.Error())
+ l4g.Close()
+ time.Sleep(time.Second)
+ panic(err)
+ }
+ utils.EnableDebugLogForTest()
+ return channel
+}
+
func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post {
id := model.NewId()