mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
more tests
This commit is contained in:
@@ -21,6 +21,7 @@ chatForwardTests = do
|
||||
it "from notes to contact" testForwardNotesToContact
|
||||
it "from notes to group" testForwardNotesToGroup
|
||||
it "from notes to notes" testForwardNotesToNotes -- TODO forward between different folders when supported
|
||||
it "preserve original forward info" testForwardPreserveInfo
|
||||
describe "forward files" $ do
|
||||
it "from contact to contact" testForwardFileNoFilesFolder
|
||||
it "with relative paths: from contact to contact" testForwardFileContactToContact
|
||||
@@ -217,6 +218,34 @@ testForwardNotesToNotes tmp =
|
||||
alice <# "* hi"
|
||||
alice <# "* hi"
|
||||
|
||||
testForwardPreserveInfo :: HasCallStack => FilePath -> IO ()
|
||||
testForwardPreserveInfo =
|
||||
testChat4 aliceProfile bobProfile cathProfile danProfile $
|
||||
\alice bob cath dan -> do
|
||||
createCCNoteFolder alice
|
||||
connectUsers alice bob
|
||||
connectUsers alice cath
|
||||
createGroup2 "team" alice dan
|
||||
|
||||
bob #> "@alice hey"
|
||||
alice <# "bob> hey"
|
||||
|
||||
alice `send` "> @bob -> * hey"
|
||||
alice <# "* -> from bob (contact id: 2)"
|
||||
alice <## " hey"
|
||||
|
||||
alice `send` "> * -> @cath hey"
|
||||
alice <# "@cath -> from bob (contact id: 2)"
|
||||
alice <## " hey"
|
||||
cath <# "alice> -> forwarded"
|
||||
cath <## " hey"
|
||||
|
||||
alice `send` ">> @cath -> #team hey"
|
||||
alice <# "#team -> from bob (contact id: 2)"
|
||||
alice <## " hey"
|
||||
dan <# "#team alice> -> forwarded"
|
||||
dan <## " hey"
|
||||
|
||||
testForwardFileNoFilesFolder :: HasCallStack => FilePath -> IO ()
|
||||
testForwardFileNoFilesFolder =
|
||||
testChat3 aliceProfile bobProfile cathProfile $
|
||||
|
||||
Reference in New Issue
Block a user