MM-15422: Adds new parameters for retrieving pages of channels. (#10903)

* MM-15422: Adds new parameters for retrieving pages of channels and searching channels.

* MM-15422: Appends excluded channel names with defaults. Adds separate struct for data-tier option parameter.
Этот коммит содержится в:
Martin Kraft
2019-05-24 11:28:42 -04:00
коммит произвёл GitHub
родитель 124b371312
Коммит e8af4872c6
11 изменённых файлов: 256 добавлений и 91 удалений

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

@@ -895,3 +895,20 @@ func TestUpdateChannelMemberRolesChangingGuest(t *testing.T) {
}
})
}
func TestDefaultChannelNames(t *testing.T) {
th := Setup(t)
defer th.TearDown()
actual := th.App.DefaultChannelNames()
expect := []string{"town-square", "off-topic"}
require.ElementsMatch(t, expect, actual)
th.App.UpdateConfig(func(cfg *model.Config) {
cfg.TeamSettings.ExperimentalDefaultChannels = []string{"foo", "bar"}
})
actual = th.App.DefaultChannelNames()
expect = []string{"town-square", "foo", "bar"}
require.ElementsMatch(t, expect, actual)
}