[PLT-5170] Add join the channel system message for the person who created the channel (#7299)

* add join the channel system message for the person who created the channel

* update test
Этот коммит содержится в:
Saturnino Abril
2017-08-31 04:29:32 +08:00
коммит произвёл Joram Wilander
родитель bb2ca558bb
Коммит f34cd567a6
5 изменённых файлов: 46 добавлений и 12 удалений

Просмотреть файл

@@ -4,6 +4,7 @@
package api4
import (
"strings"
"testing"
"github.com/mattermost/platform/app"
@@ -416,10 +417,22 @@ func TestExecuteCommand(t *testing.T) {
}
posts, err := app.GetPostsPage(channel.Id, 0, 10)
if err != nil || posts == nil || len(posts.Order) != 2 {
if err != nil || posts == nil || len(posts.Order) != 3 {
t.Fatal("Test command failed to send")
}
cmdPosted := false
for _, post := range posts.Posts {
if strings.Contains(post.Message, "test command response") {
cmdPosted = true
break
}
}
if !cmdPosted {
t.Fatal("Test command response failed to post")
}
getCmd := &model.Command{
CreatorId: th.BasicUser.Id,
TeamId: th.BasicTeam.Id,
@@ -440,7 +453,7 @@ func TestExecuteCommand(t *testing.T) {
}
posts, err = app.GetPostsPage(channel.Id, 0, 10)
if err != nil || posts == nil || len(posts.Order) != 3 {
if err != nil || posts == nil || len(posts.Order) != 4 {
t.Fatal("Test command failed to send")
}