From 541eb8c462cd1f6f3a1aaaaddf15674b2f953795 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Thu, 6 Feb 2014 21:49:19 +0400 Subject: Separate HTTP/UDP tracker response validation --- tests/Network/BitTorrent/Tracker/MessageSpec.hs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'tests/Network/BitTorrent/Tracker/MessageSpec.hs') diff --git a/tests/Network/BitTorrent/Tracker/MessageSpec.hs b/tests/Network/BitTorrent/Tracker/MessageSpec.hs index 5949de7a..87d9f191 100644 --- a/tests/Network/BitTorrent/Tracker/MessageSpec.hs +++ b/tests/Network/BitTorrent/Tracker/MessageSpec.hs @@ -4,7 +4,6 @@ {-# OPTIONS -fno-warn-orphans #-} module Network.BitTorrent.Tracker.MessageSpec ( spec - , validateInfo , arbitrarySample ) where @@ -54,19 +53,6 @@ instance Arbitrary AnnounceInfo where <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary -validateInfo :: AnnounceQuery -> AnnounceInfo -> Expectation -validateInfo _ Message.Failure {..} = error "validateInfo: failure" -validateInfo AnnounceQuery {..} AnnounceInfo {..} = do - respComplete `shouldSatisfy` isJust - respIncomplete `shouldSatisfy` isJust - respMinInterval `shouldSatisfy` isNothing - respWarning `shouldSatisfy` isNothing - peerList `shouldSatisfy` L.all (isNothing . peerId) - fromJust respComplete + fromJust respIncomplete - `shouldBe` L.length peerList - where - peerList = getPeerList respPeers - arbitrarySample :: Arbitrary a => IO a arbitrarySample = L.head <$> sample' arbitrary -- cgit v1.2.3