summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-04-13 10:57:22 -0400
committerChristopher Speller <crspeller@gmail.com>2018-04-13 07:57:22 -0700
commit21b1cd44e09c41ea581ee05de46db5e5f3fa1696 (patch)
treec939c4f6de8f72d6a2b7936b097163b273088921 /api4/user_test.go
parentae5e324be8078927bf088bc9dae37189a6ecea6f (diff)
downloadchat-21b1cd44e09c41ea581ee05de46db5e5f3fa1696.tar.gz
chat-21b1cd44e09c41ea581ee05de46db5e5f3fa1696.tar.bz2
chat-21b1cd44e09c41ea581ee05de46db5e5f3fa1696.zip
Fix error handling when requesting profile image for bad user ID (#8618)
Diffstat (limited to 'api4/user_test.go')
-rw-r--r--api4/user_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/api4/user_test.go b/api4/user_test.go
index 359756aeb..27219726b 100644
--- a/api4/user_test.go
+++ b/api4/user_test.go
@@ -834,6 +834,9 @@ func TestGetProfileImage(t *testing.T) {
_, resp = Client.GetProfileImage("junk", "")
CheckBadRequestStatus(t, resp)
+ _, resp = Client.GetProfileImage(model.NewId(), "")
+ CheckNotFoundStatus(t, resp)
+
Client.Logout()
_, resp = Client.GetProfileImage(user.Id, "")
CheckUnauthorizedStatus(t, resp)