Return http.StatusNotFound error when trying to get a channel by name without permissions (#13443)

Этот коммит содержится в:
Claudio Costa
2019-12-23 21:46:52 +01:00
коммит произвёл GitHub
родитель b3e49ec45c
Коммит 9ab7bee0a6
3 изменённых файлов: 5 добавлений и 5 удалений

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

@@ -1500,7 +1500,7 @@ func TestGetChannelByName(t *testing.T) {
Client.RemoveUserFromChannel(th.BasicPrivateChannel.Id, th.BasicUser.Id)
_, resp = Client.GetChannelByName(th.BasicPrivateChannel.Name, th.BasicTeam.Id, "")
CheckForbiddenStatus(t, resp)
CheckNotFoundStatus(t, resp)
_, resp = Client.GetChannelByName(GenerateTestChannelName(), th.BasicTeam.Id, "")
CheckNotFoundStatus(t, resp)
@@ -1553,7 +1553,7 @@ func TestGetChannelByNameForTeamName(t *testing.T) {
user := th.CreateUser()
Client.Login(user.Email, user.Password)
_, resp = Client.GetChannelByNameForTeamName(th.BasicChannel.Name, th.BasicTeam.Name, "")
CheckForbiddenStatus(t, resp)
CheckNotFoundStatus(t, resp)
}
func TestGetChannelMembers(t *testing.T) {