summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/Tracker/RPCSpec.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/Network/BitTorrent/Tracker/RPCSpec.hs b/tests/Network/BitTorrent/Tracker/RPCSpec.hs
index da4a0878..c3c7f9e2 100644
--- a/tests/Network/BitTorrent/Tracker/RPCSpec.hs
+++ b/tests/Network/BitTorrent/Tracker/RPCSpec.hs
@@ -15,9 +15,6 @@ import Network.BitTorrent.Tracker.RPC as RPC
15uris :: [URI] 15uris :: [URI]
16uris = UDP.trackerURIs ++ HTTP.trackerURIs 16uris = UDP.trackerURIs ++ HTTP.trackerURIs
17 17
18pinfo :: PeerInfo
19pinfo = PeerInfo "-HS0003-203534.37422" 6000 Nothing
20
21instance Arbitrary SAnnounceQuery where 18instance Arbitrary SAnnounceQuery where
22 arbitrary = SAnnounceQuery <$> arbitrary <*> arbitrary 19 arbitrary = SAnnounceQuery <$> arbitrary <*> arbitrary
23 <*> arbitrary <*> arbitrary 20 <*> arbitrary <*> arbitrary
@@ -28,13 +25,13 @@ spec = do
28 context (show uri) $ do 25 context (show uri) $ do
29 describe "announce" $ do 26 describe "announce" $ do
30 it "have valid response" $ do 27 it "have valid response" $ do
31 withManager def pinfo $ \ mgr -> do 28 withManager def def $ \ mgr -> do
32 q <- arbitrarySample 29 q <- arbitrarySample
33 _ <- announce mgr uri q 30 _ <- announce mgr uri q
34 return () 31 return ()
35 32
36 describe "scrape" $ do 33 describe "scrape" $ do
37 it "have valid response" $ do 34 it "have valid response" $ do
38 withManager def pinfo $ \ mgr -> do 35 withManager def def $ \ mgr -> do
39 xs <- scrape mgr uri [def] 36 xs <- scrape mgr uri [def]
40 L.length xs `shouldSatisfy` (>= 1) 37 L.length xs `shouldSatisfy` (>= 1)