PLT-2674 Private Group should not have Leave option when only one member remains (#2888)

Этот коммит содержится в:
enahum
2016-05-10 09:24:52 -03:00
коммит произвёл Christopher Speller
родитель 4f39b8b2e4
Коммит 45b22f312d
6 изменённых файлов: 42 добавлений и 17 удалений

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

@@ -485,8 +485,10 @@ func TestLeaveChannel(t *testing.T) {
Client.Must(Client.JoinChannel(channel1.Id))
// No error if you leave a channel you cannot see
Client.Must(Client.LeaveChannel(channel3.Id))
// Cannot leave a the private group if you are the only member
if _, err := Client.LeaveChannel(channel3.Id); err == nil {
t.Fatal("should have errored, cannot leave private group if only one member")
}
rchannel := Client.Must(Client.CreateDirectChannel(th.BasicUser.Id)).Data.(*model.Channel)