fix: Fix ordering with mutation queries

This commit is contained in:
Taimoor Zaeem
2025-03-17 14:13:34 +01:00
committed by Steve Chavez
parent 5ff51de36f
commit fc35d6d0f8
8 changed files with 97 additions and 4 deletions
+12
View File
@@ -149,3 +149,15 @@ spec =
{ matchStatus = 204
, matchHeaders = [matchHeaderAbsent hContentType]
}
context "with ordering" $
it "works with request method DELETE and embedded resource" $ do
request methodDelete "/artists?id=lt.3&select=id,name,albums(title)&order=id.desc"
[("Prefer", "return=representation")]
""
`shouldRespondWith`
[json| [ {"id":2,"name":"black country, new road","albums":[{"title": "ants from up above"}]}, {"id":1,"name":"duster","albums":[{"title": "stratosphere"},{"title": "contemporary movement"}]}]
|]
{ matchStatus = 200
, matchHeaders = [matchContentTypeJson, "Preference-Applied" <:> "return=representation"]
}