diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-05-11 16:32:14 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-05-11 16:32:14 -0400 |
commit | a21a06afd9907e9911dcb166d902cba9f405c7cb (patch) | |
tree | d2c5ebd2b752b8172988433e4b075badd84946af /api4/channel_test.go | |
parent | 9ad61491d693c608dd3bf4a45df9bdaf33b79016 (diff) | |
download | chat-a21a06afd9907e9911dcb166d902cba9f405c7cb.tar.gz chat-a21a06afd9907e9911dcb166d902cba9f405c7cb.tar.bz2 chat-a21a06afd9907e9911dcb166d902cba9f405c7cb.zip |
PLT-6556 Fixed last member of a channel not being able to delete channel with api v4 (#6397)
Diffstat (limited to 'api4/channel_test.go')
-rw-r--r-- | api4/channel_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/api4/channel_test.go b/api4/channel_test.go index 345bbefaf..c2c1bcf56 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -1006,6 +1006,16 @@ func TestDeleteChannel(t *testing.T) { _, resp = th.SystemAdminClient.DeleteChannel(privateChannel7.Id) CheckNoError(t, resp) + + // last member of a channel should be able to delete it regardless of required permissions + publicChannel6 = th.CreateChannelWithClient(th.Client, model.CHANNEL_OPEN) + privateChannel7 = th.CreateChannelWithClient(th.Client, model.CHANNEL_PRIVATE) + + _, resp = Client.DeleteChannel(publicChannel6.Id) + CheckNoError(t, resp) + + _, resp = Client.DeleteChannel(privateChannel7.Id) + CheckNoError(t, resp) } func TestGetChannelByName(t *testing.T) { |