diff options
Diffstat (limited to 'tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs')
-rw-r--r-- | tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs index 598b2866..8a1ffc01 100644 --- a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | |||
@@ -97,6 +97,19 @@ spec = parallel $ do | |||
97 | scrape mgr (trackerURI badTracker) [def] `shouldThrow` isSomeException | 97 | scrape mgr (trackerURI badTracker) [def] `shouldThrow` isSomeException |
98 | 98 | ||
99 | describe "RPC" $ do | 99 | describe "RPC" $ do |
100 | describe "announce" $ do | ||
101 | it "must fail on bad scheme" $ do | ||
102 | withManager rpcOpts $ \ mgr -> do | ||
103 | q <- arbitrarySample | ||
104 | announce mgr "magnet://a.com" q | ||
105 | `shouldThrow` (== UnrecognizedScheme "magnet:") | ||
106 | |||
107 | describe "scrape" $ do | ||
108 | it "must fail on bad scheme" $ do | ||
109 | withManager rpcOpts $ \ mgr -> do | ||
110 | scrape mgr "magnet://a.com" [] | ||
111 | `shouldThrow` (== UnrecognizedScheme "magnet:") | ||
112 | |||
100 | forM_ (L.filter isUdpTracker trackers) $ \ TrackerEntry {..} -> | 113 | forM_ (L.filter isUdpTracker trackers) $ \ TrackerEntry {..} -> |
101 | context trackerName $ do | 114 | context trackerName $ do |
102 | 115 | ||