-- Helpers/tests/StringsSpec.hs

import Test.Hspec
import Helpers.Strings

main :: IO()
main = hspec $ do
    describe "permute" $ do
        it "Should permute a short String" $ do
            "231" `elem` (permute "123") `shouldBe` True
        it "Should permute a long String" $ do
            "46123" `elem` (permute "12364") `shouldBe` True
    describe "rotate" $ do
        it "Should rotate a single Char" $ do
            rotate "a" `shouldBe` ["a"]
        it "Should rotate a normal Char" $ do
            "bcd" `elem` (rotate "cdb") `shouldBe` True
        it "Should not permute" $ do
            "cbda" `elem` (rotate "abcd") `shouldBe` False
