summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Network/BitTorrent')
-rw-r--r--tests/Network/BitTorrent/Exchange/SessionSpec.hs38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/Network/BitTorrent/Exchange/SessionSpec.hs b/tests/Network/BitTorrent/Exchange/SessionSpec.hs
new file mode 100644
index 00000000..9f6f11a1
--- /dev/null
+++ b/tests/Network/BitTorrent/Exchange/SessionSpec.hs
@@ -0,0 +1,38 @@
1module Network.BitTorrent.Exchange.SessionSpec (spec) where
2import Test.Hspec
3
4import Data.Torrent
5import Network.BitTorrent.Core
6import Network.BitTorrent.Exchange.Session
7
8import Config
9
10
11nullLogger :: LogFun
12nullLogger _ _ _ _ = return ()
13
14getMyAddr :: IO (PeerAddr (Maybe IP))
15getMyAddr = undefined
16
17spec :: Spec
18spec = do
19 describe "metadata exchange" $ do
20 it "should fetch info dictionary" $ do
21 pending
22{-
23 Torrent {..} <- getTestTorrent
24 ses <- newSession nullLogger addr "" tInfoDict
25 dict <- waitMetadata ses
26 closeSession ses
27 dict `shouldBe` tInfoDict
28-}
29
30 it "should serve info dictionary" $ do
31 pending
32
33 describe "content exchange" $ do
34 it "should fetch torrent content" $ do
35 pending
36
37 it "should serve torrent content" $ do
38 pending