summaryrefslogtreecommitdiffstats
path: root/api4/post_test.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-06-19 09:08:52 -0700
committerGitHub <noreply@github.com>2017-06-19 09:08:52 -0700
commite2cc0df2e83d5fd8cf6a23191dc9ffb7c20ca9b0 (patch)
treea0ccc92cdb4816c41a7bc8a8cd4751690e4db83a /api4/post_test.go
parent36f216cb7cb16958d98b3d77e121198596fd2213 (diff)
downloadchat-e2cc0df2e83d5fd8cf6a23191dc9ffb7c20ca9b0.tar.gz
chat-e2cc0df2e83d5fd8cf6a23191dc9ffb7c20ca9b0.tar.bz2
chat-e2cc0df2e83d5fd8cf6a23191dc9ffb7c20ca9b0.zip
PLT-6761 fixing unit tests (#6671)
Diffstat (limited to 'api4/post_test.go')
-rw-r--r--api4/post_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/api4/post_test.go b/api4/post_test.go
index 695597403..f2f18fbe8 100644
--- a/api4/post_test.go
+++ b/api4/post_test.go
@@ -55,7 +55,7 @@ func TestCreatePost(t *testing.T) {
_, resp = Client.CreatePost(post)
CheckBadRequestStatus(t, resp)
- post2 := &model.Post{ChannelId: th.BasicChannel2.Id, Message: "a" + model.NewId() + "a", CreateAt: 123}
+ post2 := &model.Post{ChannelId: th.BasicChannel2.Id, Message: "zz" + model.NewId() + "a", CreateAt: 123}
rpost2, resp := Client.CreatePost(post2)
if rpost2.CreateAt == post2.CreateAt {
@@ -123,7 +123,7 @@ func TestUpdatePost(t *testing.T) {
*utils.Cfg.ServiceSettings.AllowEditPost = model.ALLOW_EDIT_POST_ALWAYS
utils.SetDefaultRolesBasedOnConfig()
- post := &model.Post{ChannelId: channel.Id, Message: "a" + model.NewId() + "a"}
+ post := &model.Post{ChannelId: channel.Id, Message: "zz" + model.NewId() + "a"}
rpost, resp := Client.CreatePost(post)
CheckNoError(t, resp)
@@ -135,7 +135,7 @@ func TestUpdatePost(t *testing.T) {
t.Fatal("Newly created post shouldn't have EditAt set")
}
- msg := "a" + model.NewId() + " update post"
+ msg := "zz" + model.NewId() + " update post"
rpost.Message = msg
rupost, resp := Client.UpdatePost(rpost.Id, rpost)
CheckNoError(t, resp)
@@ -156,11 +156,11 @@ func TestUpdatePost(t *testing.T) {
t.Fatal("failed to updates")
}
- post2 := &model.Post{ChannelId: channel.Id, Message: "a" + model.NewId() + "a", Type: model.POST_JOIN_LEAVE}
+ post2 := &model.Post{ChannelId: channel.Id, Message: "zz" + model.NewId() + "a", Type: model.POST_JOIN_LEAVE}
rpost2, resp := Client.CreatePost(post2)
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: "zz" + model.NewId() + " update post 2"}
_, resp = Client.UpdatePost(rpost2.Id, up2)
CheckBadRequestStatus(t, resp)
@@ -360,7 +360,7 @@ func TestGetPostsForChannel(t *testing.T) {
post1 := th.CreatePost()
post2 := th.CreatePost()
- post3 := &model.Post{ChannelId: th.BasicChannel.Id, Message: "a" + model.NewId() + "a", RootId: post1.Id}
+ post3 := &model.Post{ChannelId: th.BasicChannel.Id, Message: "zz" + model.NewId() + "a", RootId: post1.Id}
post3, _ = Client.CreatePost(post3)
time := model.GetMillis()
@@ -803,7 +803,7 @@ func TestGetPostThread(t *testing.T) {
defer TearDown()
Client := th.Client
- post := &model.Post{ChannelId: th.BasicChannel.Id, Message: "a" + model.NewId() + "a", RootId: th.BasicPost.Id}
+ post := &model.Post{ChannelId: th.BasicChannel.Id, Message: "zz" + model.NewId() + "a", RootId: th.BasicPost.Id}
post, _ = Client.CreatePost(post)
list, resp := Client.GetPostThread(th.BasicPost.Id, "")
@@ -1071,7 +1071,7 @@ func TestGetFileInfosForPost(t *testing.T) {
}
}
- post := &model.Post{ChannelId: th.BasicChannel.Id, Message: "a" + model.NewId() + "a", FileIds: fileIds}
+ post := &model.Post{ChannelId: th.BasicChannel.Id, Message: "zz" + model.NewId() + "a", FileIds: fileIds}
post, _ = Client.CreatePost(post)
infos, resp := Client.GetFileInfosForPost(post.Id, "")