diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-08-31 04:29:32 +0800 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-08-30 16:29:32 -0400 |
commit | f34cd567a6332fe53dae27e6b99b4382505de7a1 (patch) | |
tree | e0d32d1fd51930122e8b18408fba5f30a858780c /api/post_test.go | |
parent | bb2ca558bb8a015ff850aa3887cbbfdc4e14650d (diff) | |
download | chat-f34cd567a6332fe53dae27e6b99b4382505de7a1.tar.gz chat-f34cd567a6332fe53dae27e6b99b4382505de7a1.tar.bz2 chat-f34cd567a6332fe53dae27e6b99b4382505de7a1.zip |
[PLT-5170] Add join the channel system message for the person who created the channel (#7299)
* add join the channel system message for the person who created the channel
* update test
Diffstat (limited to 'api/post_test.go')
-rw-r--r-- | api/post_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api/post_test.go b/api/post_test.go index 29c1f791a..c31439c82 100644 --- a/api/post_test.go +++ b/api/post_test.go @@ -613,8 +613,8 @@ func TestGetPostsBeforeAfter(t *testing.T) { t.Fatal("wrong order") } - if len(r1.Posts) != 3 { - t.Log(r1.Posts) + // including created post from test helper and system 'joined' message + if len(r1.Posts) != 4 { t.Fatal("wrong size") } @@ -927,8 +927,8 @@ func TestDeletePosts(t *testing.T) { r2 := Client.Must(Client.GetPosts(channel1.Id, 0, 10, "")).Data.(*model.PostList) - if len(r2.Posts) != 5 { - t.Fatal("should have returned 5 items") + if post := r2.Posts[post3.Id]; post != nil { + t.Fatal("should have not returned deleted post") } time.Sleep(10 * time.Millisecond) |