summaryrefslogtreecommitdiffstats
path: root/api4
diff options
context:
space:
mode:
Diffstat (limited to 'api4')
-rw-r--r--api4/channel_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/api4/channel_test.go b/api4/channel_test.go
index 4645a0ab6..c2a0131cf 100644
--- a/api4/channel_test.go
+++ b/api4/channel_test.go
@@ -1974,6 +1974,18 @@ func TestRemoveChannelMember(t *testing.T) {
_, resp = th.SystemAdminClient.RemoveUserFromChannel(th.BasicChannel.Id, th.BasicUser.Id)
CheckNoError(t, resp)
+ // Leave deleted channel
+ th.LoginBasic()
+ deletedChannel := th.CreatePublicChannel()
+ th.App.AddUserToChannel(th.BasicUser, deletedChannel)
+ th.App.AddUserToChannel(th.BasicUser2, deletedChannel)
+
+ deletedChannel.DeleteAt = 1
+ th.App.UpdateChannel(deletedChannel)
+
+ _, resp = Client.RemoveUserFromChannel(deletedChannel.Id, th.BasicUser.Id)
+ CheckNoError(t, resp)
+
th.LoginBasic()
private := th.CreatePrivateChannel()
th.App.AddUserToChannel(th.BasicUser2, private)