only create schema once

This commit is contained in:
Adam C. Baker
2014-12-29 17:57:31 -08:00
parent 23a75aefcc
commit c9b960f955
10 changed files with 20 additions and 14 deletions
+2 -4
View File
@@ -6,10 +6,8 @@ import Test.Hspec.Wai
import SpecHelper
spec :: Spec
spec = beforeAll (do
resetDb
createItems 15
) . afterAll_ (clearTable "items") . around withApp $ do
spec = beforeAll (clearTable "items" >> createItems 15)
. afterAll_ (clearTable "items") . around withApp $ do
describe "Querying a nonexistent table" $
it "causes a 404" $
get "/faketable" `shouldRespondWith` 404