summaryrefslogtreecommitdiff
path: root/tests/Data/Torrent
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-11-28 15:24:48 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-11-28 15:24:48 +0400
commite2edd7436a287160d993815e2dc1ad9792435b9c (patch)
tree9295e22134bdca5f4fdb12c67a2b986a667f26b8 /tests/Data/Torrent
parent2d1b6b54825fd3f072bd81ac94106edd04cf52bb (diff)
Remove byteStringToInfoHash function
Diffstat (limited to 'tests/Data/Torrent')
-rw-r--r--tests/Data/Torrent/InfoHashSpec.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/Data/Torrent/InfoHashSpec.hs b/tests/Data/Torrent/InfoHashSpec.hs
index afa017ef..3cc110c1 100644
--- a/tests/Data/Torrent/InfoHashSpec.hs
+++ b/tests/Data/Torrent/InfoHashSpec.hs
@@ -3,6 +3,7 @@ module Data.Torrent.InfoHashSpec (spec) where
3 3
4import Control.Applicative 4import Control.Applicative
5import Data.ByteString as BS 5import Data.ByteString as BS
6import Data.Convertible
6import Data.Maybe 7import Data.Maybe
7import System.FilePath 8import System.FilePath
8import Test.Hspec 9import Test.Hspec
@@ -16,7 +17,7 @@ import Data.Torrent.InfoHash as IH
16instance Arbitrary InfoHash where 17instance Arbitrary InfoHash where
17 arbitrary = do 18 arbitrary = do
18 bs <- BS.pack <$> vectorOf 20 arbitrary 19 bs <- BS.pack <$> vectorOf 20 arbitrary
19 pure $ fromMaybe (error "arbitrary infohash") $ byteStringToInfoHash bs 20 pure $ either (const (error "arbitrary infohash")) id $ safeConvert bs
20 21
21type TestPair = (FilePath, String) 22type TestPair = (FilePath, String)
22 23