tests :: IO ()
tests = hspec $ do
describe "read and interpret a torrent file 1" $ do
- it "valid announceList" $ do
+ it "valid torrent file" $ do
fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
(torrentToMetainfo fc) `shouldNotBe` (Left "parse error")
+ it "valid announce list" $ do
+ fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
+ case torrentToMetainfo fc of
+ Left _ -> pending
+ Right metainfo -> do
+ announceList metainfo `shouldNotBe` []