summaryrefslogtreecommitdiffstats
path: root/app/apptestlib.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/apptestlib.go')
-rw-r--r--app/apptestlib.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/apptestlib.go b/app/apptestlib.go
index 626e932e8..b245ddabf 100644
--- a/app/apptestlib.go
+++ b/app/apptestlib.go
@@ -227,6 +227,29 @@ func (me *TestHelper) createChannel(team *model.Team, channelType string) *model
return channel
}
+func (me *TestHelper) createChannelWithAnotherUser(team *model.Team, channelType, userId string) *model.Channel {
+ id := model.NewId()
+
+ channel := &model.Channel{
+ DisplayName: "dn_" + id,
+ Name: "name_" + id,
+ Type: channelType,
+ TeamId: team.Id,
+ CreatorId: userId,
+ }
+
+ utils.DisableDebugLogForTest()
+ var err *model.AppError
+ if channel, err = me.App.CreateChannel(channel, true); err != nil {
+ mlog.Error(err.Error())
+
+ time.Sleep(time.Second)
+ panic(err)
+ }
+ utils.EnableDebugLogForTest()
+ return channel
+}
+
func (me *TestHelper) CreateDmChannel(user *model.User) *model.Channel {
utils.DisableDebugLogForTest()
var err *model.AppError