Fix panic if JSON null value is passed as channel update (#23629)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9c656c25d9
Коммит
3705d7af4d
@@ -250,6 +250,15 @@ func TestUpdateChannel(t *testing.T) {
|
||||
_, resp, err = client.UpdateChannel(directChannel)
|
||||
require.Error(t, err)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
t.Run("null value", func(t *testing.T) {
|
||||
r, err := client.DoAPIPut(fmt.Sprintf("/channels"+"/%v", channel.Id), "null")
|
||||
resp := model.BuildResponse(r)
|
||||
defer closeBody(r)
|
||||
|
||||
require.Error(t, err)
|
||||
CheckBadRequestStatus(t, resp)
|
||||
})
|
||||
}
|
||||
|
||||
func TestPatchChannel(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user