MM-25563: Add endpoint to fetch only archived channels (#15031)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
29c8b58fc7
Коммит
77f7a97bee
@@ -944,19 +944,19 @@ func TestGetChannelsForUser(t *testing.T) {
|
||||
defer th.App.PermanentDeleteChannel(channel)
|
||||
defer th.TearDown()
|
||||
|
||||
channelList, err := th.App.GetChannelsForUser(th.BasicTeam.Id, th.BasicUser.Id, false)
|
||||
channelList, err := th.App.GetChannelsForUser(th.BasicTeam.Id, th.BasicUser.Id, false, 0)
|
||||
require.Nil(t, err)
|
||||
require.Len(t, *channelList, 4)
|
||||
|
||||
th.App.DeleteChannel(channel, th.BasicUser.Id)
|
||||
|
||||
// Now we get all the non-archived channels for the user
|
||||
channelList, err = th.App.GetChannelsForUser(th.BasicTeam.Id, th.BasicUser.Id, false)
|
||||
channelList, err = th.App.GetChannelsForUser(th.BasicTeam.Id, th.BasicUser.Id, false, 0)
|
||||
require.Nil(t, err)
|
||||
require.Len(t, *channelList, 3)
|
||||
|
||||
// Now we get all the channels, even though are archived, for the user
|
||||
channelList, err = th.App.GetChannelsForUser(th.BasicTeam.Id, th.BasicUser.Id, true)
|
||||
channelList, err = th.App.GetChannelsForUser(th.BasicTeam.Id, th.BasicUser.Id, true, 0)
|
||||
require.Nil(t, err)
|
||||
require.Len(t, *channelList, 4)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user