fix: inconsistent Preference-Applied

* Don't apply `tx=commit` if the transaction doesn't commit
* Apply `count=exact`
* Also simplifies the Preference-Applied logic, removing the need for
  some functions.
This commit is contained in:
steve-chavez
2023-09-12 13:52:49 -03:00
committed by Steve Chavez
parent 3f5e840baf
commit d8a91453d1
11 changed files with 82 additions and 161 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ spec =
`shouldRespondWith` [json|[{"id":2}]|]
{ matchStatus = 200
, matchHeaders = ["Content-Range" <:> "*/1"
, "Preference-Applied" <:> "return=representation"]
, "Preference-Applied" <:> "return=representation, count=exact"]
}
it "ignores ?select= when return not set or return=minimal" $ do