diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-21 02:48:58 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-21 02:48:58 +0400 |
commit | 76ef96ac3d5ad8d8ac3921fb0683a8e192e54090 (patch) | |
tree | 31061c252041942294a2cb2009355decc73b0872 /tests/Network | |
parent | a1b4c8f9ed0034fd383cfc3d5162135fc81f49c9 (diff) |
Rename startNode to newNode
Diffstat (limited to 'tests/Network')
-rw-r--r-- | tests/Network/BitTorrent/DHT/QuerySpec.hs | 2 | ||||
-rw-r--r-- | tests/Network/BitTorrent/DHT/SessionSpec.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/Network/BitTorrent/DHT/QuerySpec.hs b/tests/Network/BitTorrent/DHT/QuerySpec.hs index b89ce4ff..33114b40 100644 --- a/tests/Network/BitTorrent/DHT/QuerySpec.hs +++ b/tests/Network/BitTorrent/DHT/QuerySpec.hs | |||
@@ -28,7 +28,7 @@ nullLogger _ _ _ _ = return () | |||
28 | 28 | ||
29 | simpleDHT :: [NodeHandler IPv4] -> DHT IPv4 a -> IO a | 29 | simpleDHT :: [NodeHandler IPv4] -> DHT IPv4 a -> IO a |
30 | simpleDHT hs m = | 30 | simpleDHT hs m = |
31 | bracket (startNode hs def myAddr nullLogger) stopNode $ \ node -> | 31 | bracket (newNode hs def myAddr nullLogger) closeNode $ \ node -> |
32 | runDHT node m | 32 | runDHT node m |
33 | 33 | ||
34 | getBootInfo :: IO (NodeInfo IPv4) | 34 | getBootInfo :: IO (NodeInfo IPv4) |
diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs index 41852763..b3b9a9fc 100644 --- a/tests/Network/BitTorrent/DHT/SessionSpec.hs +++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs | |||
@@ -39,10 +39,10 @@ spec :: Spec | |||
39 | spec = do | 39 | spec = do |
40 | describe "session" $ do | 40 | describe "session" $ do |
41 | it "is active until stopNode called" $ do | 41 | it "is active until stopNode called" $ do |
42 | node <- startNode [] def myAddr nullLogger | 42 | node <- newNode [] def myAddr nullLogger |
43 | runDHT node monadActive `shouldReturn` True | 43 | runDHT node monadActive `shouldReturn` True |
44 | runDHT node monadActive `shouldReturn` True | 44 | runDHT node monadActive `shouldReturn` True |
45 | stopNode node | 45 | closeNode node |
46 | runDHT node monadActive `shouldReturn` False | 46 | runDHT node monadActive `shouldReturn` False |
47 | 47 | ||
48 | describe "tokens" $ do | 48 | describe "tokens" $ do |