diff options
| author | Carlos Sosa <gnusosa@gnusosa.net> | 2020-04-18 20:08:00 -0700 |
|---|---|---|
| committer | Carlos Sosa <gnusosa@gnusosa.net> | 2020-04-23 09:21:02 -0700 |
| commit | c72953df05259b20a7fc87117aefbbe284a376a1 (patch) | |
| tree | 1a1515d0ada2adcc07e32095e841c8c2d4a0f982 /test/Sound/MusicDirTrans/FileSpec.hs | |
Diffstat (limited to 'test/Sound/MusicDirTrans/FileSpec.hs')
| -rw-r--r-- | test/Sound/MusicDirTrans/FileSpec.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Sound/MusicDirTrans/FileSpec.hs b/test/Sound/MusicDirTrans/FileSpec.hs new file mode 100644 index 0000000..37f8851 --- /dev/null +++ b/test/Sound/MusicDirTrans/FileSpec.hs @@ -0,0 +1,25 @@ +module Sound.MusicDirTrans.FileSpec + ( spec + ) +where + +import Test.Hspec +import Sound.MusicDirTrans +import Sound.MusicDirTrans.Test.Util + +spec :: Spec +spec = do + describe "trackFilePatterns" $ do + it "should compile track file extensions patterns" $ do + trackFilePatterns `shouldBe` patterns + + describe "getMetadata" $ do + it "should gather track metadata" $ do + fileMetadata <- getMetadata "audio-samples/sample.flac" + sampleMetadata `shouldBe` fileMetadata + + describe "mkNewPathName" $ do + it "should create an Artist -> Album ArtistPath structure" $ do + mkArtistPath origPath metadata `shouldBe` artistPath + mkArtistPath origPath metadataWithoutYear + `shouldBe` artistPathWithoutYear |
