Merge pull request #1397 from akhesaCaro/compiling_sqlite_simple_cookbook

Fixing Servant cookbooks part 1 (-testing + sqlite-simple)
This commit is contained in:
Gaël Deest 2021-03-18 11:09:21 +01:00 committed by GitHub
commit 53e943b5bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -26,7 +26,7 @@ packages:
doc/cookbook/custom-errors
doc/cookbook/basic-streaming
doc/cookbook/db-postgres-pool
-- doc/cookbook/db-sqlite-simple
doc/cookbook/db-sqlite-simple
doc/cookbook/file-upload
doc/cookbook/generic
-- doc/cookbook/hoist-server-with-context
@ -54,9 +54,6 @@ constraints:
constraints: base-compat ^>=0.11
constraints: semigroups ^>=0.19
-- MonadFail
-- https://github.com/nurpax/sqlite-simple/issues/74
constraints: sqlite-simple < 0
-- allow-newer: sqlite-simple-0.4.16.0:semigroups
-- allow-newer: direct-sqlite-2.3.24:semigroups

View file

@ -23,7 +23,7 @@ executable cookbook-db-sqlite-simple
, http-types >= 0.12
, markdown-unlit >= 0.4
, http-client >= 0.5
, sqlite-simple >= 0.4
, sqlite-simple >= 0.4.5.0
, transformers
default-language: Haskell2010
ghc-options: -Wall -pgmL markdown-unlit

View file

@ -126,8 +126,11 @@ spec = describe "Servant.Docs" $ do
it "mentions headers" $ do
md `shouldContain` "- This endpoint is sensitive to the value of the **X-Test** HTTP header."
it "contains response samples" $
md `shouldContain` "{\"dt1field1\":\"field 1\",\"dt1field2\":13}"
it "contains response samples - dt1field1" $
md `shouldContain` "\"dt1field1\":\"field 1\""
it "contains response samples - dt1field2" $
md `shouldContain` "\"dt1field2\":13"
it "contains request body samples" $
md `shouldContain` "17"