From 58382149103c70c543dd56008d1c7099d6194b6b Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 16 Apr 2020 08:42:46 +0200 Subject: [PATCH] Fix tests for explicit errors in aeson-1.4.7, and raise lower bound --- postgrest.cabal | 6 +++--- test/Feature/InsertSpec.hs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/postgrest.cabal b/postgrest.cabal index 3d810a11c..2f40cf93f 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -46,7 +46,7 @@ library build-depends: base >= 4.9 && < 4.14 , HTTP >= 4000.3.7 && < 4000.4 , Ranged-sets >= 0.3 && < 0.5 - , aeson >= 0.11.3 && < 1.5 + , aeson >= 1.4.7 && < 1.5 , ansi-wl-pprint >= 0.6.7 && < 0.7 , base64-bytestring >= 1 && < 1.1 , bytestring >= 0.10.8 && < 0.11 @@ -155,7 +155,7 @@ test-suite spec TestTypes hs-source-dirs: test build-depends: base >= 4.9 && < 4.14 - , aeson >= 0.11.3 && < 1.5 + , aeson >= 1.4.7 && < 1.5 , aeson-qq >= 0.8.1 && < 0.9 , async >= 2.1.1 && < 2.3 , auto-update >= 0.1.4 && < 0.2 @@ -199,7 +199,7 @@ Test-Suite spec-querycost Main-Is: QueryCost.hs Other-Modules: SpecHelper Build-Depends: base >= 4.9 && < 4.14 - , aeson >= 0.11.3 && < 1.5 + , aeson >= 1.4.7 && < 1.5 , aeson-qq >= 0.8.1 && < 0.9 , async >= 2.1.1 && < 2.3 , auto-update >= 0.1.4 && < 0.2 diff --git a/test/Feature/InsertSpec.hs b/test/Feature/InsertSpec.hs index c6732a340..7dca5c454 100644 --- a/test/Feature/InsertSpec.hs +++ b/test/Feature/InsertSpec.hs @@ -204,7 +204,7 @@ spec actualPgVersion = do it "fails with 400 and error" $ post "/simple_pk" "}{ x = 2" `shouldRespondWith` - [json|{"message":"Error in $: Failed reading: not a valid json value"}|] + [json|{"message":"Error in $: Failed reading: not a valid json value at '}{x=2'"}|] { matchStatus = 400 , matchHeaders = [matchContentTypeJson] } @@ -425,7 +425,7 @@ spec actualPgVersion = do it "fails with 400 and error" $ request methodPatch "/simple_pk" [] "}{ x = 2" `shouldRespondWith` - [json|{"message":"Error in $: Failed reading: not a valid json value"}|] + [json|{"message":"Error in $: Failed reading: not a valid json value at '}{x=2'"}|] { matchStatus = 400, matchHeaders = [matchContentTypeJson] }