1{-# LANGUAGE OverloadedStrings #-}
4import System.Environment
10import Test.Tasty.QuickCheck
11import qualified Data.Text as T
13----------------------------------------------------------------------
14withQuickCheckDepth :: TestName -> Int -> [TestTree] -> TestTree
15withQuickCheckDepth tn depth tests =
16 localOption (QuickCheckTests depth) (testGroup tn tests)
18----------------------------------------------------------------------
19onlineTestsIfEnabled :: IO [TestTree]
20onlineTestsIfEnabled = do
21 apiKey <- (return . fmap T.pack) =<< lookupEnv "MANDRILL_API_KEY"
25 testGroup "Mandrill online tests" [
26 testCase "users/info.json" (testOnlineUsersInfo k)
27 , testCase "users/ping2.json" (testOnlineUsersPing2 k)
28 , testCase "users/senders.json" (testOnlineUsersSenders k)
29 , testCase "messages/send.json" (testOnlineMessagesSend k)
32----------------------------------------------------------------------
35 onlineTests <- onlineTestsIfEnabled
36 defaultMainWithIngredients defaultIngredients $
37 testGroup "Mandrill tests" $ onlineTests <> [
38 testGroup "Mandrill offline tests" [
39 testCase "users/info.json API parsing" testUsersInfo
40 , testCase "users/senders.json API parsing" testUsersSenders
41 , testCase "messages/send.json API parsing" testMessagesSend
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list