From 80d9b5f02c5b245717651132482f11ac66a7ef4a Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Wed, 26 Feb 2014 19:06:58 +0400 Subject: Fix dht present spec item --- tests/Network/BitTorrent/DHT/MessageSpec.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/Network') diff --git a/tests/Network/BitTorrent/DHT/MessageSpec.hs b/tests/Network/BitTorrent/DHT/MessageSpec.hs index 0d84c919..4ec875dd 100644 --- a/tests/Network/BitTorrent/DHT/MessageSpec.hs +++ b/tests/Network/BitTorrent/DHT/MessageSpec.hs @@ -7,6 +7,7 @@ import Data.BEncode as BE import Data.ByteString.Lazy as BL import Data.Default import Data.List as L +import Data.Maybe import Network.BitTorrent.Core import Network.BitTorrent.DHT.Message import qualified Network.KRPC as KRPC (def) @@ -57,12 +58,13 @@ spec :: Spec spec = do context ("you need running DHT node at " ++ show remoteAddr) $ do it "is running" $ do - _ <- retry 5 $ timeout (100 * 1000) $ do + running <- retry 5 $ timeout (100 * 1000) $ do nid <- genNodeId Response _remoteAddr Ping <- rpc (query remoteAddr (Query nid Ping)) return () - return () + running `shouldSatisfy` isJust + describe "ping" $ do it "properly bencoded" $ do BE.decode "d2:id20:abcdefghij0123456789e" -- cgit v1.2.3