MM-31105 /Join <channel name> is case sensitive (#16903)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
23d51ed1f2
Коммит
c64959b439
@@ -8,6 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
_ "github.com/mattermost/mattermost-server/v5/app/slashcommands"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
@@ -128,6 +129,13 @@ func testJoinCommands(t *testing.T, alias string) {
|
||||
}
|
||||
}
|
||||
require.True(t, found, "did not join channel")
|
||||
|
||||
// test case insensitively
|
||||
channel4 := &model.Channel{DisplayName: "BB", Name: "bb" + model.NewId() + "a", Type: model.CHANNEL_OPEN, TeamId: team.Id}
|
||||
channel4 = Client.Must(Client.CreateChannel(channel4)).(*model.Channel)
|
||||
Client.Must(Client.RemoveUserFromChannel(channel4.Id, th.BasicUser.Id))
|
||||
rs7 := Client.Must(Client.ExecuteCommand(channel0.Id, "/"+alias+" "+strings.ToUpper(channel4.Name))).(*model.CommandResponse)
|
||||
require.True(t, strings.HasSuffix(rs7.GotoLocation, "/"+team.Name+"/channels/"+channel4.Name), "failed to join channel")
|
||||
}
|
||||
|
||||
func TestJoinCommands(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user