Skip to content

Commit

Permalink
Merge pull request #1397 from akhesaCaro/compiling_sqlite_simple_cook…
Browse files Browse the repository at this point in the history
…book

Fixing Servant cookbooks part 1 (-testing + sqlite-simple)
  • Loading branch information
Gaël Deest authored and akhesaCaro committed Mar 18, 2021
2 parents a74d9d9 + 269e546 commit fad1444
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 1 addition & 4 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ executable cookbook-jwt-and-basic-auth
, servant
, servant-client
, servant-server
, servant-auth ==0.3.*
, servant-auth
, servant-auth-server >= 0.3.1.0
, warp >= 3.2
, wai >= 3.2
Expand Down
7 changes: 5 additions & 2 deletions servant-docs/test/Servant/DocsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit fad1444

Please sign in to comment.