From 4d68fd81b0b461026d76743973545f202beb5a13 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:27:45 +0400 Subject: [PATCH] more tests --- tests/ChatTests/Forward.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ChatTests/Forward.hs b/tests/ChatTests/Forward.hs index b7f8428806..8be70a3b75 100644 --- a/tests/ChatTests/Forward.hs +++ b/tests/ChatTests/Forward.hs @@ -6,6 +6,7 @@ module ChatTests.Forward where import ChatClient import ChatTests.Utils import qualified Data.ByteString.Char8 as B +import System.Directory (doesFileExist) import Test.Hspec hiding (it) chatForwardTests :: SpecWith FilePath @@ -348,3 +349,10 @@ testForwardFileRelativePaths = dest2 <- B.readFile "./tests/tmp/cath_files/test_1.pdf" dest2 `shouldBe` src + + -- deleting original file doesn't delete forwarded file + checkActionDeletesFile "./tests/tmp/bob_files/test.pdf" $ do + bob ##> "/clear alice" + bob <## "alice: all messages are removed locally ONLY" + fwdFileExists <- doesFileExist "./tests/tmp/bob_files/test_1.pdf" + fwdFileExists `shouldBe` True