summaryrefslogtreecommitdiff
path: root/tests/Data/Torrent
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-11-28 06:42:10 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-11-28 06:42:10 +0400
commit32027c2d4392fb6964bafe3aaf6d427e5d827d21 (patch)
tree3c58da15d8c7a4b84c9dbe19ac22eb5e6ffed4a8 /tests/Data/Torrent
parentfc4ed85a313f93b4fb0c46b500ee12c38e94df68 (diff)
Hide InfoHash constructor
Diffstat (limited to 'tests/Data/Torrent')
-rw-r--r--tests/Data/Torrent/MagnetSpec.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/Data/Torrent/MagnetSpec.hs b/tests/Data/Torrent/MagnetSpec.hs
index 3ecf8705..048a1870 100644
--- a/tests/Data/Torrent/MagnetSpec.hs
+++ b/tests/Data/Torrent/MagnetSpec.hs
@@ -9,7 +9,6 @@ import Test.QuickCheck
9import Test.QuickCheck.Instances () 9import Test.QuickCheck.Instances ()
10import Network.URI 10import Network.URI
11 11
12import Data.Torrent.InfoHash
13import Data.Torrent.Magnet 12import Data.Torrent.Magnet
14import Data.Torrent.InfoHashSpec () 13import Data.Torrent.InfoHashSpec ()
15 14
@@ -36,10 +35,10 @@ spec = do
36 35
37 it "parse base32" $ do 36 it "parse base32" $ do
38 let magnet = "magnet:?xt=urn:btih:CT76LXJDDCH5LS2TUHKH6EUJ3NYKX4Y6" 37 let magnet = "magnet:?xt=urn:btih:CT76LXJDDCH5LS2TUHKH6EUJ3NYKX4Y6"
39 let ih = InfoHash "\DC4\255\229\221#\CAN\143\213\203S\161\212\DEL\DC2\137\219p\171\243\RS" 38 let ih = "CT76LXJDDCH5LS2TUHKH6EUJ3NYKX4Y6"
40 parseMagnet magnet `shouldBe` Just (nullMagnet ih) 39 parseMagnet magnet `shouldBe` Just (nullMagnet ih)
41 40
42 it "parse base16" $ do 41 it "parse base16" $ do
43 let magnet = "magnet:?xt=urn:btih:0123456789abcdef0123456789abcdef01234567" 42 let magnet = "magnet:?xt=urn:btih:0123456789abcdef0123456789abcdef01234567"
44 let ih = InfoHash "\SOH#Eg\137\171\205\239\SOH#Eg\137\171\205\239\SOH#Eg" 43 let ih = "0123456789abcdef0123456789abcdef01234567"
45 parseMagnet magnet `shouldBe` Just (nullMagnet ih) 44 parseMagnet magnet `shouldBe` Just (nullMagnet ih)