From 4fa86bf2814eac33ddcd6fe16a2d9c6110d1064d Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Thu, 27 Feb 2014 16:38:49 +0400 Subject: s/UnrecognizedProtocol/UnrecognizedScheme --- tests/Network/BitTorrent/Tracker/RPCSpec.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/Network') diff --git a/tests/Network/BitTorrent/Tracker/RPCSpec.hs b/tests/Network/BitTorrent/Tracker/RPCSpec.hs index b816a9ce..dfc13a1e 100644 --- a/tests/Network/BitTorrent/Tracker/RPCSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPCSpec.hs @@ -24,9 +24,9 @@ rpcOpts = def { optUdpRPC = UDP.rpcOpts } -isUnrecognizedProtocol :: String -> RpcException -> Bool -isUnrecognizedProtocol x (UnrecognizedProtocol scheme) = x == scheme -isUnrecognizedProtocol _ _ = False +matchUnrecognizedScheme :: String -> RpcException -> Bool +matchUnrecognizedScheme x (UnrecognizedScheme scheme) = x == scheme +matchUnrecognizedScheme _ _ = False spec :: Spec spec = parallel $ do @@ -46,13 +46,13 @@ spec = parallel $ do withManager rpcOpts def $ \ mgr -> do q <- arbitrarySample announce mgr "magnet://foo.bar" q - `shouldThrow` isUnrecognizedProtocol "magnet:" + `shouldThrow` matchUnrecognizedScheme "magnet:" describe "scrape" $ do it "must fail on bad uri scheme" $ do withManager rpcOpts def $ \ mgr -> do scrape mgr "magnet://foo.bar" [] - `shouldThrow` isUnrecognizedProtocol "magnet:" + `shouldThrow` matchUnrecognizedScheme "magnet:" forM_ trackers $ \ TrackerEntry {..} -> context trackerName $ do -- cgit v1.2.3