@@ -33,7 +33,7 @@ spec actualPgVersion = do
3333 resStatus = simpleStatus r
3434
3535 liftIO $ do
36- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
36+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
3737 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
3838 totalCost `shouldBe`
3939 if actualPgVersion > pgVersion120
@@ -49,7 +49,7 @@ spec actualPgVersion = do
4949 resStatus = simpleStatus r
5050
5151 liftIO $ do
52- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
52+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
5353 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
5454 totalCost `shouldBe`
5555 if actualPgVersion > pgVersion120
@@ -65,7 +65,7 @@ spec actualPgVersion = do
6565 resHeaders = simpleHeaders r
6666
6767 liftIO $ do
68- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; options=buffers; charset=utf-8" )
68+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; options=buffers; charset=utf-8" )
6969 resBody `shouldSatisfy` (\ t -> T. isInfixOf " Shared Hit Blocks" (decodeUtf8 $ BS. toStrict t))
7070 else do
7171 -- analyze is required for buffers on pg < 13
@@ -75,7 +75,7 @@ spec actualPgVersion = do
7575 resHeaders = simpleHeaders r
7676
7777 liftIO $ do
78- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; options=analyze|buffers; charset=utf-8" )
78+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; options=analyze|buffers; charset=utf-8" )
7979 blocks `shouldBe` Just [aesonQQ | 1.0 |]
8080
8181 when (actualPgVersion >= pgVersion120) $
@@ -86,7 +86,7 @@ spec actualPgVersion = do
8686 resHeaders = simpleHeaders r
8787
8888 liftIO $ do
89- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; options=settings; charset=utf-8" )
89+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; options=settings; charset=utf-8" )
9090 searchPath `shouldBe`
9191 Just [aesonQQ |
9292 {
@@ -102,7 +102,7 @@ spec actualPgVersion = do
102102 resHeaders = simpleHeaders r
103103
104104 liftIO $ do
105- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; options=analyze|wal; charset=utf-8" )
105+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; options=analyze|wal; charset=utf-8" )
106106 walRecords `shouldBe` Just [aesonQQ |0|]
107107
108108 it " outputs columns info when using the verbose option" $ do
@@ -112,7 +112,7 @@ spec actualPgVersion = do
112112 resHeaders = simpleHeaders r
113113
114114 liftIO $ do
115- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; options=verbose; charset=utf-8" )
115+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; options=verbose; charset=utf-8" )
116116 cols `shouldBe` Just [aesonQQ | ["projects.id", "projects.name", "projects.client_id"] |]
117117
118118 it " outputs the plan for application/json " $ do
@@ -151,7 +151,7 @@ spec actualPgVersion = do
151151 resStatus = simpleStatus r
152152
153153 liftIO $ do
154- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
154+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
155155 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
156156 totalCost `shouldBe` 3.27
157157
@@ -164,7 +164,7 @@ spec actualPgVersion = do
164164 resStatus = simpleStatus r
165165
166166 liftIO $ do
167- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
167+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
168168 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
169169 totalCost `shouldBe` 12.45
170170
@@ -177,7 +177,7 @@ spec actualPgVersion = do
177177 resStatus = simpleStatus r
178178
179179 liftIO $ do
180- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
180+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
181181 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
182182 totalCost `shouldBe` 15.68
183183
@@ -191,7 +191,7 @@ spec actualPgVersion = do
191191 resStatus = simpleStatus r
192192
193193 liftIO $ do
194- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
194+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
195195 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
196196 totalCost `shouldBe` 1.29
197197
@@ -216,7 +216,7 @@ spec actualPgVersion = do
216216 resStatus = simpleStatus r
217217
218218 liftIO $ do
219- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; charset=utf-8" )
219+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+json; for= \" application/json \" ; charset=utf-8" )
220220 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
221221 totalCost `shouldBe` 68.56
222222
@@ -241,7 +241,7 @@ spec actualPgVersion = do
241241 resStatus = simpleStatus r
242242
243243 liftIO $ do
244- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+text; charset=utf-8" )
244+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+text; for= \" application/json \" ; charset=utf-8" )
245245 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
246246 resBody `shouldSatisfy` (\ t -> LBS. take 9 t == " Aggregate" )
247247
@@ -254,7 +254,7 @@ spec actualPgVersion = do
254254 resStatus = simpleStatus r
255255
256256 liftIO $ do
257- resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan; charset=utf-8" )
257+ resHeaders `shouldSatisfy` elem (" Content-Type" , " application/vnd.pgrst.plan+text; for= \" application/json \" ; charset=utf-8" )
258258 resStatus `shouldBe` Status { statusCode = 200 , statusMessage= " OK" }
259259 resBody `shouldSatisfy` (\ t -> LBS. take 9 t == " Aggregate" )
260260
0 commit comments