diff options
Diffstat (limited to 'api4/file_test.go')
-rw-r--r-- | api4/file_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/api4/file_test.go b/api4/file_test.go index 584625f70..615e601dc 100644 --- a/api4/file_test.go +++ b/api4/file_test.go @@ -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) |