From 024c65c4f626018925a8aa158c9bf1a3a82ef843 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Thu, 27 Feb 2014 16:01:49 +0400 Subject: Fix indentation --- tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs | 55 ++++++++++++------------ 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs index f9eb62d9..15c0ef4f 100644 --- a/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs @@ -23,30 +23,31 @@ validateInfo AnnounceQuery {..} AnnounceInfo {..} = do spec :: Spec spec = parallel $ do - forM_ (L.filter isHttpTracker trackers) $ \ TrackerEntry {..} -> - context trackerName $ do - - describe "announce" $ do - if tryAnnounce - then do - it "have valid response" $ do - withManager def $ \ mgr -> do --- q <- arbitrarySample - let q = AnnounceQuery def "-HS0003-203534.37420" 6000 - (Progress 0 0 0) Nothing Nothing (Just Started) - info <- announce mgr trackerURI q - validateInfo q info - else do - it "should fail with RequestFailed" $ do - pending - - describe "scrape" $ do - if tryScraping - then do - it "have valid response" $ do - withManager def $ \ mgr -> do - xs <- scrape mgr trackerURI [def] - L.length xs `shouldSatisfy` (>= 1) - else do - it "should fail with ScrapelessTracker" $ do - pending + describe "RPC" $ do + forM_ (L.filter isHttpTracker trackers) $ \ TrackerEntry {..} -> + context trackerName $ do + + describe "announce" $ do + if tryAnnounce + then do + it "have valid response" $ do + withManager def $ \ mgr -> do +-- q <- arbitrarySample + let q = AnnounceQuery def "-HS0003-203534.37420" 6000 + (Progress 0 0 0) Nothing Nothing (Just Started) + info <- announce mgr trackerURI q + validateInfo q info + else do + it "should fail with RequestFailed" $ do + pending + + describe "scrape" $ do + if tryScraping + then do + it "have valid response" $ do + withManager def $ \ mgr -> do + xs <- scrape mgr trackerURI [def] + L.length xs `shouldSatisfy` (>= 1) + else do + it "should fail with ScrapelessTracker" $ do + pending -- cgit v1.2.3