summaryrefslogtreecommitdiff
path: root/tests/Data/Torrent
diff options
context:
space:
mode:
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