[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
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
bb2ca558bb
Коммит
f34cd567a6
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user