diff options
Diffstat (limited to 'tests/Network')
-rw-r--r-- | tests/Network/BitTorrent/Tracker/SessionSpec.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Network/BitTorrent/Tracker/SessionSpec.hs b/tests/Network/BitTorrent/Tracker/SessionSpec.hs index 27a9ae1e..2c471752 100644 --- a/tests/Network/BitTorrent/Tracker/SessionSpec.hs +++ b/tests/Network/BitTorrent/Tracker/SessionSpec.hs | |||
@@ -42,6 +42,18 @@ spec = do | |||
42 | stopped <- getStatus s | 42 | stopped <- getStatus s |
43 | stopped `shouldBe` Paused | 43 | stopped `shouldBe` Paused |
44 | 44 | ||
45 | it "completed event do not change status" $ do | ||
46 | testSession True $ \ m s -> do | ||
47 | notify m s Completed | ||
48 | status <- getStatus s | ||
49 | status `shouldBe` Paused | ||
50 | |||
51 | testSession True $ \ m s -> do | ||
52 | notify m s Started | ||
53 | notify m s Completed | ||
54 | status <- getStatus s | ||
55 | status `shouldBe` Running | ||
56 | |||
45 | it "return non-empty list of peers" $ do | 57 | it "return non-empty list of peers" $ do |
46 | testSession False $ \ m s -> do | 58 | testSession False $ \ m s -> do |
47 | notify m s Started | 59 | notify m s Started |