Fxing some unit tests (#5817)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dcdea9b54c
Коммит
7caab35cfa
@@ -738,7 +738,7 @@ func TestGetChannelMembers(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, resp = Client.GetChannelMembers("", 0, 60, "")
|
_, resp = Client.GetChannelMembers("", 0, 60, "")
|
||||||
CheckUnauthorizedStatus(t, resp)
|
CheckBadRequestStatus(t, resp)
|
||||||
|
|
||||||
_, resp = Client.GetChannelMembers("junk", 0, 60, "")
|
_, resp = Client.GetChannelMembers("junk", 0, 60, "")
|
||||||
CheckBadRequestStatus(t, resp)
|
CheckBadRequestStatus(t, resp)
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ func TestUpdatePost(t *testing.T) {
|
|||||||
|
|
||||||
msg := "a" + model.NewId() + " update post"
|
msg := "a" + model.NewId() + " update post"
|
||||||
rpost.Message = msg
|
rpost.Message = msg
|
||||||
rupost, resp := Client.UpdatePost(rpost.Id, rpost);
|
rupost, resp := Client.UpdatePost(rpost.Id, rpost)
|
||||||
CheckNoError(t, resp)
|
CheckNoError(t, resp)
|
||||||
|
|
||||||
if rupost.Message != msg {
|
if rupost.Message != msg {
|
||||||
@@ -147,7 +147,7 @@ func TestUpdatePost(t *testing.T) {
|
|||||||
|
|
||||||
msg1 := "#hashtag a" + model.NewId() + " update post again"
|
msg1 := "#hashtag a" + model.NewId() + " update post again"
|
||||||
rpost.Message = msg1
|
rpost.Message = msg1
|
||||||
rrupost, resp := Client.UpdatePost(rpost.Id, rpost);
|
rrupost, resp := Client.UpdatePost(rpost.Id, rpost)
|
||||||
CheckNoError(t, resp)
|
CheckNoError(t, resp)
|
||||||
|
|
||||||
if rrupost.Message != msg1 && rrupost.Hashtags != "#hashtag" {
|
if rrupost.Message != msg1 && rrupost.Hashtags != "#hashtag" {
|
||||||
@@ -159,7 +159,7 @@ func TestUpdatePost(t *testing.T) {
|
|||||||
CheckNoError(t, resp)
|
CheckNoError(t, resp)
|
||||||
|
|
||||||
up2 := &model.Post{Id: rpost2.Id, ChannelId: channel.Id, Message: "a" + model.NewId() + " update post 2"}
|
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)
|
CheckBadRequestStatus(t, resp)
|
||||||
|
|
||||||
Client.Logout()
|
Client.Logout()
|
||||||
@@ -230,7 +230,7 @@ func TestGetPostsForChannel(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, resp = Client.GetPostsForChannel("", 0, 60, "")
|
_, resp = Client.GetPostsForChannel("", 0, 60, "")
|
||||||
CheckUnauthorizedStatus(t, resp)
|
CheckBadRequestStatus(t, resp)
|
||||||
|
|
||||||
_, resp = Client.GetPostsForChannel("junk", 0, 60, "")
|
_, resp = Client.GetPostsForChannel("junk", 0, 60, "")
|
||||||
CheckBadRequestStatus(t, resp)
|
CheckBadRequestStatus(t, resp)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user