summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Exchange
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-04-26 07:26:36 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-04-26 07:26:36 +0400
commit55d59c4857dee7e2ab091405e79854c944c7e7e3 (patch)
tree92ddc89ea3d2d139cab901be232caa5436c0ae42 /tests/Network/BitTorrent/Exchange
parentdab822160dbd0b9d4581c13d19f0efb9addc2db6 (diff)
Bump conduit dependency
Diffstat (limited to 'tests/Network/BitTorrent/Exchange')
-rw-r--r--tests/Network/BitTorrent/Exchange/DownloadSpec.hs14
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs
index a0d40af3..d46f2034 100644
--- a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs
+++ b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs
@@ -33,19 +33,7 @@ withUpdates m = do
33 undefined 33 undefined
34 34
35simulateFetch :: InfoDict -> Updates s (Maybe InfoDict) 35simulateFetch :: InfoDict -> Updates s (Maybe InfoDict)
36simulateFetch dict = go 36simulateFetch dict = undefined
37 where
38 blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict))
39 packPiece ix = Torrent.Piece ix (blocks !! ix)
40 ih = idInfoHash dict
41
42 go = do
43 mix <- scheduleBlock undefined undefined
44 case mix of
45 Nothing -> return Nothing
46 Just ix -> do
47 mdict <- pushBlock undefined (packPiece ix)
48 maybe go (return . Just) mdict
49 37
50spec :: Spec 38spec :: Spec
51spec = do 39spec = do