create items in test, not in the schema.

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