Ensure db fixtures loaded in feature specs

This commit is contained in:
Joe Nelson
2014-08-17 16:18:09 -07:00
parent 3a646a4eb4
commit 0fbfa2395b
4 changed files with 29 additions and 14 deletions
+4 -5
View File
@@ -5,16 +5,15 @@ import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Dbapi (AppConfig(..), app)
import SpecHelper
import Dbapi (app)
main :: IO ()
main = hspec spec
cfg :: AppConfig
cfg = AppConfig "postgres://postgres:@localhost:5432/dbapi_test" 9000
spec :: Spec
spec = with (return $ app cfg) $ do
spec = with (prepareAppDb "schema" $ app cfg) $ do
describe "GET /" $ do
it "responds with 200" $ do
get "/" `shouldRespondWith` 200