[PLT-8430] Auto lowercase team and channel names in API requests (#7992)

This commit is contained in:
Carlos Tadeu Panato Junior
2018-01-12 15:01:45 +01:00
committed by Joram Wilander
parent 4acc2238e9
commit 3d3a234fca
3 changed files with 10 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import (
"reflect"
"sort"
"strconv"
"strings"
"testing"
"github.com/mattermost/mattermost-server/model"
@@ -1136,6 +1137,9 @@ func TestGetChannelByName(t *testing.T) {
t.Fatal("names did not match")
}
_, resp = Client.GetChannelByName(strings.ToUpper(th.BasicPrivateChannel.Name), th.BasicTeam.Id, "")
CheckNoError(t, resp)
Client.RemoveUserFromChannel(th.BasicChannel.Id, th.BasicUser.Id)
_, resp = Client.GetChannelByName(th.BasicChannel.Name, th.BasicTeam.Id, "")
CheckNoError(t, resp)