hspec $ do
describe "read and interpret a torrent file 1" $ do
it "valid torrent file" $ do
- (torrentToMetainfo fc) `shouldNotBe` (Left "parse error")
+ minfo `shouldNotBe` (Left "parse error")
it "valid announce list" $ do
- case torrentToMetainfo fc of
+ case minfo of
Left _ -> pending
Right metainfo -> do
announceList metainfo `shouldSatisfy` (not . null)
it "valid piece length" $ do
- case torrentToMetainfo fc of
+ case minfo of
Left _ -> pending
Right metainfo -> do
let (Just info') = info metainfo
pieceLength info' `shouldBe` (524288 :: Integer)
it "Not a multifile torrent" $ do
- case torrentToMetainfo fc of
+ case minfo of
Left _ -> pending
Right metainfo -> do
let (Just i) = info metainfo