From 506d48c18481edcfe8315cd00c111127d78e73f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Dimja=C5=A1evi=C4=87?= Date: Fri, 6 Jan 2023 11:38:45 +0100 Subject: [PATCH] Test: cannot delete when MLS disabled --- services/galley/test/integration/API/MLS.hs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/services/galley/test/integration/API/MLS.hs b/services/galley/test/integration/API/MLS.hs index 20e7f91180a..fd42d1a3712 100644 --- a/services/galley/test/integration/API/MLS.hs +++ b/services/galley/test/integration/API/MLS.hs @@ -205,7 +205,8 @@ tests s = [ test s "cannot create MLS conversations" postMLSConvDisabled, test s "cannot send an MLS message" postMLSMessageDisabled, test s "cannot send a commit bundle" postMLSBundleDisabled, - test s "cannot get group info" getGroupInfoDisabled + test s "cannot get group info" getGroupInfoDisabled, + test s "cannot delete a subconversation" deleteSubConversationDisabled ], testGroup "SubConversation" @@ -2309,6 +2310,18 @@ getGroupInfoDisabled = do getGroupInfo (qUnqualified alice) (fmap Conv qcnv) !!! assertMLSNotEnabled +deleteSubConversationDisabled :: TestM () +deleteSubConversationDisabled = do + alice <- randomUser + cnvId <- Qualified <$> randomId <*> pure (Domain "www.example.com") + let scnvId = SubConvId "conference" + dsc = + DeleteSubConversation + (GroupId "deadbeef") + (Epoch 0) + withMLSDisabled $ + deleteSubConv alice cnvId scnvId dsc !!! assertMLSNotEnabled + testCreateSubConv :: Bool -> TestM () testCreateSubConv parentIsMLSConv = do alice <- randomQualifiedUser