13 lines
452 B
Haskell
13 lines
452 B
Haskell
import Test.Hspec
|
|
import qualified Crypto as Cr
|
|
|
|
main :: IO ()
|
|
main = hspec $ do
|
|
describe "Crypto" $ do
|
|
it "should encrypt and decrypt a message correctly" $ do
|
|
let originalMessage = "Hello, World!"
|
|
masterPassword = "mysecretpassword"
|
|
encryptedMessage = Cr.encrypt' masterPassword originalMessage
|
|
decryptedMessage = Cr.decrypt' masterPassword encryptedMessage
|
|
decryptedMessage `shouldBe` originalMessage
|