PLT-7718 Patch for files (#7564)
* Patch for files * Fix merge * Fix tests * Fix another test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fa80cb10a8
Коммит
fadd9514f6
@@ -1475,7 +1475,7 @@ func TestGetChannelUnread(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
|
||||
_, resp = th.SystemAdminClient.GetChannelUnread(model.NewId(), user.Id)
|
||||
CheckNotFoundStatus(t, resp)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
_, resp = th.SystemAdminClient.GetChannelUnread(channel.Id, model.NewId())
|
||||
CheckNotFoundStatus(t, resp)
|
||||
|
||||
@@ -102,6 +102,15 @@ func TestUploadFile(t *testing.T) {
|
||||
_, resp := Client.UploadFile(data, model.NewId(), "test.png")
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
_, resp = Client.UploadFile(data, "../../junk", "test.png")
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
_, resp = th.SystemAdminClient.UploadFile(data, model.NewId(), "test.png")
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
_, resp = th.SystemAdminClient.UploadFile(data, "../../junk", "test.png")
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
_, resp = th.SystemAdminClient.UploadFile(data, channel.Id, "test.png")
|
||||
CheckNoError(t, resp)
|
||||
|
||||
|
||||
@@ -391,11 +391,7 @@ func TestGetOutgoingWebhooks(t *testing.T) {
|
||||
}
|
||||
|
||||
hooks, resp = th.SystemAdminClient.GetOutgoingWebhooksForChannel(model.NewId(), 0, 1000, "")
|
||||
CheckNoError(t, resp)
|
||||
|
||||
if len(hooks) != 0 {
|
||||
t.Fatal("no hooks should be returned")
|
||||
}
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
_, resp = Client.GetOutgoingWebhooks(0, 1000, "")
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
Ссылка в новой задаче
Block a user