PLT-2674 Private Group should not have Leave option when only one member remains (#2888)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
4f39b8b2e4
Коммит
45b22f312d
@@ -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)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user