diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-03-20 16:47:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 16:47:53 -0400 |
commit | 7caab35cfab461a243eee0abe8d858f554ac0519 (patch) | |
tree | a1a7e800277f5006f8f0d89696339fb2f5a248d1 /api4 | |
parent | dcdea9b54c14329e47a0cb7c6dffb9da765b35c6 (diff) | |
download | chat-7caab35cfab461a243eee0abe8d858f554ac0519.tar.gz chat-7caab35cfab461a243eee0abe8d858f554ac0519.tar.bz2 chat-7caab35cfab461a243eee0abe8d858f554ac0519.zip |
Fxing some unit tests (#5817)
Diffstat (limited to 'api4')
-rw-r--r-- | api4/channel_test.go | 2 | ||||
-rw-r--r-- | api4/post_test.go | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/api4/channel_test.go b/api4/channel_test.go index fd72a8ba7..754413300 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -738,7 +738,7 @@ func TestGetChannelMembers(t *testing.T) { } _, resp = Client.GetChannelMembers("", 0, 60, "") - CheckUnauthorizedStatus(t, resp) + CheckBadRequestStatus(t, resp) _, resp = Client.GetChannelMembers("junk", 0, 60, "") CheckBadRequestStatus(t, resp) diff --git a/api4/post_test.go b/api4/post_test.go index 4f8242564..5c5c98d3d 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -135,7 +135,7 @@ func TestUpdatePost(t *testing.T) { msg := "a" + model.NewId() + " update post" rpost.Message = msg - rupost, resp := Client.UpdatePost(rpost.Id, rpost); + rupost, resp := Client.UpdatePost(rpost.Id, rpost) CheckNoError(t, resp) if rupost.Message != msg { @@ -147,7 +147,7 @@ func TestUpdatePost(t *testing.T) { msg1 := "#hashtag a" + model.NewId() + " update post again" rpost.Message = msg1 - rrupost, resp := Client.UpdatePost(rpost.Id, rpost); + rrupost, resp := Client.UpdatePost(rpost.Id, rpost) CheckNoError(t, resp) if rrupost.Message != msg1 && rrupost.Hashtags != "#hashtag" { @@ -159,7 +159,7 @@ func TestUpdatePost(t *testing.T) { CheckNoError(t, resp) up2 := &model.Post{Id: rpost2.Id, ChannelId: channel.Id, Message: "a" + model.NewId() + " update post 2"} - _, resp = Client.UpdatePost(rpost2.Id, up2); + _, resp = Client.UpdatePost(rpost2.Id, up2) CheckBadRequestStatus(t, resp) Client.Logout() @@ -230,7 +230,7 @@ func TestGetPostsForChannel(t *testing.T) { } _, resp = Client.GetPostsForChannel("", 0, 60, "") - CheckUnauthorizedStatus(t, resp) + CheckBadRequestStatus(t, resp) _, resp = Client.GetPostsForChannel("junk", 0, 60, "") CheckBadRequestStatus(t, resp) |