diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-27 16:07:57 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-27 16:07:57 +0400 |
commit | 8ecef49a857486c25bed0de9d673accb01616b7d (patch) | |
tree | bd362dc6f397fd87083ff896a78c11c0e9322fd7 /tests/Network/BitTorrent | |
parent | 024c65c4f626018925a8aa158c9bf1a3a82ef843 (diff) |
Add pending spec items
Diffstat (limited to 'tests/Network/BitTorrent')
-rw-r--r-- | tests/Network/BitTorrent/Tracker/RPCSpec.hs | 65 |
1 files changed, 42 insertions, 23 deletions
diff --git a/tests/Network/BitTorrent/Tracker/RPCSpec.hs b/tests/Network/BitTorrent/Tracker/RPCSpec.hs index 3b89714c..f8057d85 100644 --- a/tests/Network/BitTorrent/Tracker/RPCSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPCSpec.hs | |||
@@ -25,26 +25,45 @@ rpcOpts = def | |||
25 | 25 | ||
26 | spec :: Spec | 26 | spec :: Spec |
27 | spec = do | 27 | spec = do |
28 | forM_ trackers $ \ TrackerEntry {..} -> | 28 | describe "Manager" $ do |
29 | context trackerName $ do | 29 | describe "newManager" $ do |
30 | 30 | it "" $ pending | |
31 | describe "announce" $ do | 31 | |
32 | if tryAnnounce then do | 32 | describe "closeManager" $ do |
33 | it "have valid response" $ do | 33 | it "" $ pending |
34 | withManager rpcOpts def $ \ mgr -> do | 34 | |
35 | q <- arbitrarySample | 35 | describe "withManager" $ do |
36 | _ <- announce mgr trackerURI q | 36 | it "" $ pending |
37 | return () | 37 | |
38 | else do | 38 | describe "RPC" $ do |
39 | it "should throw exception" $ do | 39 | describe "announce" $ do |
40 | pending | 40 | it "must fail on bad uri scheme" $ do |
41 | 41 | pending | |
42 | describe "scrape" $ do | 42 | |
43 | if tryScraping then do | 43 | describe "scrape" $ do |
44 | it "have valid response" $ do | 44 | it "must fail on bad uri scheme" $ do |
45 | withManager rpcOpts def $ \ mgr -> do | 45 | pending |
46 | xs <- scrape mgr trackerURI [def] | 46 | |
47 | L.length xs `shouldSatisfy` (>= 1) | 47 | forM_ trackers $ \ TrackerEntry {..} -> |
48 | else do | 48 | context trackerName $ do |
49 | it "should throw exception" $ do | 49 | |
50 | pending | 50 | describe "announce" $ do |
51 | if tryAnnounce then do | ||
52 | it "have valid response" $ do | ||
53 | withManager rpcOpts def $ \ mgr -> do | ||
54 | q <- arbitrarySample | ||
55 | _ <- announce mgr trackerURI q | ||
56 | return () | ||
57 | else do | ||
58 | it "should throw exception" $ do | ||
59 | pending | ||
60 | |||
61 | describe "scrape" $ do | ||
62 | if tryScraping then do | ||
63 | it "have valid response" $ do | ||
64 | withManager rpcOpts def $ \ mgr -> do | ||
65 | xs <- scrape mgr trackerURI [def] | ||
66 | L.length xs `shouldSatisfy` (>= 1) | ||
67 | else do | ||
68 | it "should throw exception" $ do | ||
69 | pending | ||