chore: change server timing render to response

"render" is a loaded term than might be thought as the generation
of a full HTML page. While for this phase we only process the status
and the headers.

Changing it to "response" so is not misleading at least. Users can check the
docs for clarification.
This commit is contained in:
steve-chavez
2023-11-28 10:25:25 -05:00
committed by Steve Chavez
parent 3d56f8435d
commit 958339b8d3
3 changed files with 30 additions and 30 deletions
+7 -7
View File
@@ -14,7 +14,7 @@ spec :: SpecWith ((), Application)
spec =
describe "Show Duration on Server-Timing header" $ do
context "responds with Server-Timing header" $ do
context "responseonds with Server-Timing header" $ do
it "works with get request" $ do
request methodGet "/organizations?id=eq.6"
[]
@@ -22,7 +22,7 @@ spec =
`shouldRespondWith`
[json|[{"id":6,"name":"Oscorp","referee":3,"auditor":4,"manager_id":6}]|]
{ matchStatus = 200
, matchHeaders = matchContentTypeJson : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "render"]
, matchHeaders = matchContentTypeJson : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "response"]
}
it "works with post request" $
@@ -32,7 +32,7 @@ spec =
`shouldRespondWith`
[json|[{"id":7,"name":"John","referee":null,"auditor":null,"manager_id":6}]|]
{ matchStatus = 201
, matchHeaders = matchContentTypeJson : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "render"]
, matchHeaders = matchContentTypeJson : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "response"]
}
it "works with patch request" $
@@ -41,7 +41,7 @@ spec =
`shouldRespondWith`
""
{ matchStatus = 204
, matchHeaders = matchHeaderAbsent hContentType : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "render"]
, matchHeaders = matchHeaderAbsent hContentType : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "response"]
}
it "works with put request" $
@@ -51,7 +51,7 @@ spec =
`shouldRespondWith`
[json| [ { "name": "Python", "rank": 19 } ]|]
{ matchStatus = 200
, matchHeaders = map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "render"]
, matchHeaders = map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "response"]
}
it "works with delete request" $
@@ -61,7 +61,7 @@ spec =
`shouldRespondWith`
""
{ matchStatus = 204
, matchHeaders = matchHeaderAbsent hContentType : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "render"]
, matchHeaders = matchHeaderAbsent hContentType : map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "response"]
}
it "works with rpc call" $
@@ -71,5 +71,5 @@ spec =
`shouldRespondWith`
[json|{"x": 1, "y": 2}|]
{ matchStatus = 200
, matchHeaders = map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "render"]
, matchHeaders = map matchServerTimingHasTiming ["jwt", "parse", "plan", "transaction", "response"]
}