2021-02-01 01:25:52 +00:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
2021-02-05 18:19:26 +00:00
|
|
|
module AppMainSpec where
|
2021-02-01 01:25:52 +00:00
|
|
|
|
|
|
|
import Database.PostgreSQL.Transact
|
|
|
|
|
|
|
|
import Test.Hspec
|
|
|
|
|
|
|
|
import Control.Monad.IO.Class (liftIO)
|
|
|
|
|
|
|
|
-- internal imports
|
|
|
|
|
2022-09-16 13:55:22 +00:00
|
|
|
import Util
|
2021-02-01 01:25:52 +00:00
|
|
|
import TestUtil
|
|
|
|
|
2021-02-05 18:19:26 +00:00
|
|
|
spec :: Spec
|
2021-02-01 01:25:52 +00:00
|
|
|
spec = describeDB (const $ return ()) "Initialize DB" $
|
2022-09-16 13:55:22 +00:00
|
|
|
itDB "calls initialization script" $ do
|
2021-02-01 01:25:52 +00:00
|
|
|
conn <- getConnection
|
2022-09-16 13:55:22 +00:00
|
|
|
liftIO $ shouldReturn (initDB conn) ()
|