[MM-17069]also unread the given post (#11932)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
600cf71ee9
Коммит
3629f26bb9
@@ -2686,7 +2686,7 @@ func TestSetChannelUnread(t *testing.T) {
|
||||
checkHTTPStatus(t, r, 200, false)
|
||||
unread, err := th.App.GetChannelUnread(c1.Id, u1.Id)
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, int64(1), unread.MsgCount)
|
||||
assert.Equal(t, int64(2), unread.MsgCount)
|
||||
})
|
||||
|
||||
t.Run("Unread on a private channel", func(t *testing.T) {
|
||||
@@ -2694,12 +2694,12 @@ func TestSetChannelUnread(t *testing.T) {
|
||||
assert.Equal(t, 200, r.StatusCode)
|
||||
unread, err := th.App.GetChannelUnread(th.BasicPrivateChannel.Id, u1.Id)
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, int64(0), unread.MsgCount)
|
||||
assert.Equal(t, int64(1), unread.MsgCount)
|
||||
r = th.Client.SetPostUnread(u1.Id, pp1.Id)
|
||||
assert.Equal(t, 200, r.StatusCode)
|
||||
unread, err = th.App.GetChannelUnread(th.BasicPrivateChannel.Id, u1.Id)
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, int64(1), unread.MsgCount)
|
||||
assert.Equal(t, int64(2), unread.MsgCount)
|
||||
})
|
||||
|
||||
t.Run("Can't unread an imaginary post", func(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user