MM-14897: Changes to be able to add and remove groups from channels. (#10794)

* MM-15162: Changes for LDAP groups removals phase.

* MM-14897: Changes to be able to add and remove groups from channels.

* Update model/client4.go

* MM-14897: PR-requested change to string interpolation.
Этот коммит содержится в:
Martin Kraft
2019-05-15 12:03:47 -04:00
коммит произвёл GitHub
родитель dd33bc13a7
Коммит 1b78f9debc
18 изменённых файлов: 475 добавлений и 143 удалений

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

@@ -215,11 +215,18 @@ func TestGetGroupsByChannel(t *testing.T) {
require.Nil(t, err)
require.NotNil(t, gs)
groups, err := th.App.GetGroupsByChannel(th.BasicChannel.Id, 0, 60)
opts := model.GroupSearchOpts{
PageOpts: &model.PageOpts{
Page: 0,
PerPage: 60,
},
}
groups, _, err := th.App.GetGroupsByChannel(th.BasicChannel.Id, opts)
require.Nil(t, err)
require.ElementsMatch(t, []*model.Group{group}, groups)
groups, err = th.App.GetGroupsByChannel(model.NewId(), 0, 60)
groups, _, err = th.App.GetGroupsByChannel(model.NewId(), opts)
require.Nil(t, err)
require.Empty(t, groups)
}