From 3d65d66b1b1f9a7f6423cc8acfbb6a161cf64c94 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 14 Jun 2022 23:57:36 +0200 Subject: [PATCH] tests: fix incomplete pattern warnings (GHC 9.2) --- test/spec/Feature/Query/InsertSpec.hs | 2 +- test/spec/SpecHelper.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/Feature/Query/InsertSpec.hs b/test/spec/Feature/Query/InsertSpec.hs index 7a8caddca..18ff34957 100644 --- a/test/spec/Feature/Query/InsertSpec.hs +++ b/test/spec/Feature/Query/InsertSpec.hs @@ -498,7 +498,7 @@ spec actualPgVersion = do [json|[ { "k":"圍棋", "extra":"¥" } ]|] { matchStatus = 201 } - let Just location = lookup hLocation $ simpleHeaders p + Just location <- pure $ lookup hLocation $ simpleHeaders p get location `shouldRespondWith` [json|[ { "k":"圍棋", "extra":"¥" } ]|] diff --git a/test/spec/SpecHelper.hs b/test/spec/SpecHelper.hs index 3a01eaa80..d2b07c402 100644 --- a/test/spec/SpecHelper.hs +++ b/test/spec/SpecHelper.hs @@ -52,7 +52,7 @@ validateOpenApiResponse headers = do let respHeaders = simpleHeaders r in respHeaders `shouldSatisfy` \hs -> ("Content-Type", "application/openapi+json; charset=utf-8") `elem` hs - let Just body = decode (simpleBody r) + Just body <- pure $ decode (simpleBody r) Just schema <- liftIO $ decode <$> BL.readFile "test/spec/fixtures/openapi.json" let args :: M.Map Text Value args = M.fromList