summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Tracker/SessionSpec.hs
blob: db86b60e1dee80899ea98d894ab634c8349b1dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Network.BitTorrent.Tracker.SessionSpec (spec) where
import Data.Default
import Data.List as L
import Network.URI
import Test.Hspec

import Data.Torrent
import Network.BitTorrent.Tracker.List
import Network.BitTorrent.Tracker.RPC
import Network.BitTorrent.Tracker.Session

import Network.BitTorrent.Tracker.TestData


spec :: Spec
spec = do
  describe "Session" $ do
    it "" $ do
      withManager def def $ \ m -> do
        s <- newSession def undefined
        notify m s Started
        peers <- askPeers m s
        peers `shouldSatisfy` (not . L.null)