From 24df88dd3e63024155d86ac3231ca2abbba3fc86 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 4 Feb 2014 18:16:14 +0400 Subject: Update tests --- tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs') diff --git a/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs index eb549516..81c4fae0 100644 --- a/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPC/HTTPSpec.hs @@ -24,11 +24,13 @@ spec = do context (show uri) $ do describe "announce" $ do it "have valid response" $ do - q <- arbitrarySample - info <- runResourceT $ connect uri >>= announce q - validateInfo q info + withManager def $ \ mgr -> do + q <- arbitrarySample + info <- runResourceT $ announce mgr uri q + validateInfo q info describe "scrape" $ do it "have valid response" $ do - xs <- runResourceT $ connect uri >>= scrape [def] - L.length xs `shouldSatisfy` (>= 1) + withManager def $ \ mgr -> do + xs <- runResourceT $ scrape mgr uri [def] + L.length xs `shouldSatisfy` (>= 1) -- cgit v1.2.3