MM-10272: Add a count for pinned posts header icon (#11840)

Этот коммит содержится в:
Woolim Cho
2019-09-04 20:41:29 +09:00
коммит произвёл Ben Schumacher
родитель 5a477a617a
Коммит b9a3c2e90e
11 изменённых файлов: 231 добавлений и 4 удалений

Просмотреть файл

@@ -1849,6 +1849,16 @@ func TestGetChannelStats(t *testing.T) {
t.Fatal("couldnt't get extra info")
} else if stats.MemberCount != 1 {
t.Fatal("got incorrect member count")
} else if stats.PinnedPostCount != 0 {
t.Fatal("got incorrect pinned post count")
}
th.CreatePinnedPostWithClient(th.Client, channel)
stats, resp = Client.GetChannelStats(channel.Id, "")
CheckNoError(t, resp)
if stats.PinnedPostCount != 1 {
t.Fatal("should have returned 1 pinned post count")
}
_, resp = Client.GetChannelStats("junk", "")