mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 16:25:57 +00:00
core: improve some tests (#4000)
This commit is contained in:
@@ -2503,6 +2503,7 @@ testPlanHostContactDeletedGroupLinkKnown =
|
||||
testPlanGroupLinkOwn :: HasCallStack => FilePath -> IO ()
|
||||
testPlanGroupLinkOwn tmp =
|
||||
withNewTestChatCfg tmp testCfgGroupLinkViaContact "alice" aliceProfile $ \alice -> do
|
||||
threadDelay 100000
|
||||
alice ##> "/g team"
|
||||
alice <## "group #team is created"
|
||||
alice <## "to add members use /a team <name> or /create link #team"
|
||||
@@ -5186,7 +5187,11 @@ testGroupHistoryWelcomeMessage =
|
||||
|
||||
cath ##> "/_get chat #1 count=100"
|
||||
r <- chat <$> getTermLine cath
|
||||
r `shouldContain` [(0, "hello"), (0, "hey!"), (0, "welcome to team")]
|
||||
-- sometimes there are "connected" and feature items in between,
|
||||
-- so we filter them out; `shouldContain` then checks order is correct
|
||||
let expected = [(0, "hello"), (0, "hey!"), (0, "welcome to team")]
|
||||
r' = filter (`elem` expected) r
|
||||
r' `shouldContain` expected
|
||||
|
||||
-- message delivery works after sending history
|
||||
alice #> "#team 1"
|
||||
|
||||
Reference in New Issue
Block a user