]> git.rkrishnan.org Git - functorrent.git/blob - test/MetainfoTests.hs
add a very simple Metainfo test
[functorrent.git] / test / MetainfoTests.hs
1 -- | Tests for Metainfo module
2
3 module MetainfoTests where
4
5 import Prelude hiding (readFile)
6
7 import FuncTorrent.Metainfo
8 import Test.Hspec
9 import Data.ByteString (readFile)
10
11 tests :: IO ()
12 tests = hspec $ do
13   describe "read and interpret a torrent file 1" $ do
14     it "valid announceList" $ do
15       fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
16       (torrentToMetainfo fc) `shouldNotBe` (Left "parse error")
17