From: Ramakrishnan Muthukrishnan Date: Mon, 31 Jul 2017 02:32:32 +0000 (+0530) Subject: metainfotests: refactor X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/biz/cyclelanguage?a=commitdiff_plain;h=9d57d0353054fc75922282a91d971fe81b0ff7eb;p=functorrent.git metainfotests: refactor --- diff --git a/test/MetainfoTests.hs b/test/MetainfoTests.hs index 32d98e5..a9043db 100644 --- a/test/MetainfoTests.hs +++ b/test/MetainfoTests.hs @@ -36,20 +36,20 @@ tests = do 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