summaryrefslogtreecommitdiff
path: root/tests/Data/Torrent/ClientSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Data/Torrent/ClientSpec.hs')
-rw-r--r--tests/Data/Torrent/ClientSpec.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Data/Torrent/ClientSpec.hs b/tests/Data/Torrent/ClientSpec.hs
new file mode 100644
index 00000000..f02a3b1f
--- /dev/null
+++ b/tests/Data/Torrent/ClientSpec.hs
@@ -0,0 +1,16 @@
1module Data.Torrent.ClientSpec (spec) where
2
3import Data.Version
4import Test.Hspec
5
6import Data.Torrent.Client
7import Network.BitTorrent.Core.PeerId
8
9spec :: Spec
10spec = do
11 describe "client info" $ do
12 it "decode azureus encoded peer id" $ do
13 clientInfo "-AZ2060-xxxxxxxxxxxx" `shouldBe`
14 ClientInfo IAzureus (ClientVersion (Version [2060] []))
15 clientInfo "-BS0000-xxxxxxxxxxxx" `shouldBe`
16 ClientInfo IBTSlave (ClientVersion (Version [0] []))