From 915dab01a9aefd59497ea97e76b45db3a865635f Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Sat, 30 Nov 2013 13:30:19 +0400 Subject: Rename scrape datatypes --- tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/Network/BitTorrent/Tracker') diff --git a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs index 1a893011..73cf07f3 100644 --- a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs @@ -11,7 +11,7 @@ import Test.Hspec import Test.QuickCheck import Network.BitTorrent.Core.PeerAddr -import Network.BitTorrent.Tracker.RPC.Message +import Network.BitTorrent.Tracker.RPC.Message as Message import Network.BitTorrent.Tracker.RPC.UDP import Network.BitTorrent.Tracker.RPC.MessageSpec () @@ -27,6 +27,7 @@ trackerURIs = -- relation with query: peer id, numwant validateInfo :: AnnounceQuery -> AnnounceInfo -> Expectation +validateInfo _ Message.Failure {..} = error "validateInfo: failure" validateInfo AnnounceQuery {..} AnnounceInfo {..} = do respComplete `shouldSatisfy` isJust respIncomplete `shouldSatisfy` isJust @@ -44,11 +45,10 @@ spec = do context (show uri) $ do describe "announce" $ do it "have valid response" $ do - query <- arbitrarySample - connect uri >>= announce query >>= validateInfo query + q <- arbitrarySample + connect uri >>= announce q >>= validateInfo q describe "scrape" $ do it "have valid response" $ do xs <- connect uri >>= scrape [def] - return () --- L.length xs `shouldSatisfy` (>= 1) + L.length xs `shouldSatisfy` (>= 1) -- cgit v1.2.3