-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathATNDSpec.hs
35 lines (29 loc) · 1.02 KB
/
ATNDSpec.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{-# LANGUAGE OverloadedStrings #-}
module Web.ATNDSpec(main, spec) where
import Test.Hspec
import Test.QuickCheck
import Control.Exception(evaluate)
import Web.ATND
import Web.ATND.Event
import Web.ATND.Util
import Data.Text(Text)
import Control.Monad.Logger
import Control.Monad.IO.Class
main :: IO ()
main = hspec spec
keywds :: Maybe [Text]
keywds = Just ["haskell"]
spec :: Spec
spec = do
describe "Web.ATND.runATNDT" $ do
it "returns the list of events" $ do
cfg <- defaultATNDConfig
res <- liftIO $ runNoLoggingT $ runATNDT cfg $ getEvents Nothing keywds
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
(length $ events res) `shouldSatisfy` (>0)
describe "Web.ATND.runATND" $ do
it "returns the list of events" $ do
cfg <- defaultATNDConfig
res <- runATND cfg $ getEvents Nothing keywds
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
(length $ events res) `shouldSatisfy` (>0)