Files
postgrest/test/Main.hs
T
Joe Nelson f1ecbec543 Do not quote params in Location header
Also treat the enum field in OPTIONS as an array uniformly
2014-12-06 17:42:21 -08:00

27 lines
665 B
Haskell

{-# LANGUAGE QuasiQuotes #-}
module Main where
import Control.Monad (void)
import qualified Hasql as H
import System.Process
import Test.Hspec
import SpecHelper
import Spec
main :: IO ()
main = do
H.session pgSettings testSettings $
H.tx Nothing $ do
H.unit [H.q| drop schema if exists "1" cascade |]
H.unit [H.q| drop schema if exists private cascade |]
H.unit [H.q| drop schema if exists dbapi cascade |]
loadFixture "roles"
loadFixture "schema"
hspec spec
loadFixture :: FilePath -> IO()
loadFixture name =
void $ readProcess "psql" ["-U", "dbapi_test", "-d", "dbapi_test", "-a", "-f", "test/fixtures/" ++ name ++ ".sql"] []