diff options
author | enahum <nahumhbl@gmail.com> | 2016-05-10 09:24:52 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-10 08:24:52 -0400 |
commit | 45b22f312d3f57c63f86ffdbbb50c29108099993 (patch) | |
tree | 0921119d05ff8ae01a660269d3d1da639062c074 /api/channel_test.go | |
parent | 4f39b8b2e4e919c036d37718346a420f5a36f885 (diff) | |
download | chat-45b22f312d3f57c63f86ffdbbb50c29108099993.tar.gz chat-45b22f312d3f57c63f86ffdbbb50c29108099993.tar.bz2 chat-45b22f312d3f57c63f86ffdbbb50c29108099993.zip |
PLT-2674 Private Group should not have Leave option when only one member remains (#2888)
Diffstat (limited to 'api/channel_test.go')
-rw-r--r-- | api/channel_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/channel_test.go b/api/channel_test.go index 69902c3ad..6a907b278 100644 --- a/api/channel_test.go +++ b/api/channel_test.go @@ -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) |