module Sound.MusicDirTrans.TypeSpec ( spec ) where import Test.Hspec import Sound.MusicDirTrans import Sound.MusicDirTrans.Test.Util spec :: Spec spec = do describe "AudioTrack" $ do it "should work with the show function" $ do show $ AudioTrack "Mono/Requiem for Hell (2019)/01-song.flac" `shouldBe` "AudioTrack {currentPath = \"Mono/Requiem for Hell (2019)/01-song.flac\"}" it "should have an equivalency" $ do AudioTrack "Mono/Requiem for Hell (2019)/01-song.flac" == AudioTrack "Mono/Requiem for Hell (2019)/01-song.flac" `shouldBe` True it "should have currentPath field accessible" $do currentPath (AudioTrack "Mono/Requiem for Hell (2019)/01-song.flac") `shouldBe` "Mono/Requiem for Hell (2019)/01-song.flac" describe "ArtistPath" $ do it "should work with the show function" $ do show artistPath `shouldBe` artistPathStr it "should have an equivalency" $ do artistPath == artistPath `shouldBe` True it "should have rootPath field accessible" $ do rootPath artistPath `shouldBe` origPath it "should have parentPath field accessible" $ do parentPath artistPath `shouldBe` "Mono" it "should have childPath field accessible" $ do childPath artistPath `shouldBe` "Requiem for Hell (2019)" describe "Metadata" $ do it "should work with the show function" $ do show $ sampleMetadata `shouldBe` sampleMetadataStr describe "newPath" $ do it "should create a concatenated filepath" $ do newPath artistPath `shouldBe` "Mono/Requiem for Hell (2019)/"