summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-04-03 00:58:59 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-04-03 00:58:59 +0400
commit35a049358dbc84f1b24e8e6d3f7e5e1dc0d5e0ae (patch)
tree3704c8118943db24c06d538b45531a25c13cb081
parent14a90a6848b4fb39cd61459746ca8ea136adffb0 (diff)
[Client] Add spec item for openMagnet
-rw-r--r--bittorrent.cabal1
-rw-r--r--tests/Network/BitTorrent/Client/HandleSpec.hs19
2 files changed, 20 insertions, 0 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal
index 48e7a8cc..7058d704 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -190,6 +190,7 @@ test-suite spec
190 Data.Torrent.MetainfoSpec 190 Data.Torrent.MetainfoSpec
191 Data.Torrent.PieceSpec 191 Data.Torrent.PieceSpec
192 Data.Torrent.ProgressSpec 192 Data.Torrent.ProgressSpec
193 Network.BitTorrent.Client.HandleSpec
193 Network.BitTorrent.CoreSpec 194 Network.BitTorrent.CoreSpec
194 Network.BitTorrent.Core.FingerprintSpec 195 Network.BitTorrent.Core.FingerprintSpec
195 Network.BitTorrent.Core.NodeInfoSpec 196 Network.BitTorrent.Core.NodeInfoSpec
diff --git a/tests/Network/BitTorrent/Client/HandleSpec.hs b/tests/Network/BitTorrent/Client/HandleSpec.hs
new file mode 100644
index 00000000..8e16d9b0
--- /dev/null
+++ b/tests/Network/BitTorrent/Client/HandleSpec.hs
@@ -0,0 +1,19 @@
1module Network.BitTorrent.Client.HandleSpec (spec) where
2import Data.Default
3import Test.Hspec
4
5import Data.Torrent.Magnet
6import Network.BitTorrent.Client
7import Network.BitTorrent.Client.Handle
8
9data_dir :: FilePath
10data_dir = "data"
11
12spec :: Spec
13spec = do
14 describe "openMagnet" $ do
15 it "should add new infohash to index" $ do
16 simpleClient $ do
17 _ <- openMagnet data_dir (nullMagnet def)
18 _ <- getHandle def
19 return ()