From 9d57d0353054fc75922282a91d971fe81b0ff7eb Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Mon, 31 Jul 2017 08:02:32 +0530
Subject: [PATCH] metainfotests: refactor

---
 test/MetainfoTests.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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
-- 
2.45.2