From 8cc4f27f7cb17af34951ad4c7a59ca7bad082f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Fri, 3 Aug 2018 10:44:32 +0200 Subject: MM-11529: Allow to Leave an archived channel from the API (#9204) * MM-11529: Allow to Leave an archived channel from the API * Remove the restriction to remove user from archive channel to yourself --- api4/channel_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'api4') 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) -- cgit v1.2.3-1-g7c22