=htc #16806 add test demonstrating custom CT and CL in response to non-transparent HEAD request
This commit is contained in:
parent
37aa2cb886
commit
87d2a7fa36
1 changed files with 17 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class ResponseRendererSpec extends FreeSpec with Matchers with BeforeAndAfterAll
|
|||
}
|
||||
}
|
||||
|
||||
"to a HEAD request" in new TestSetup() {
|
||||
"to a transparent HEAD request" in new TestSetup() {
|
||||
ResponseRenderingContext(
|
||||
requestMethod = HttpMethods.HEAD,
|
||||
response = HttpResponse(
|
||||
|
|
@ -91,6 +91,22 @@ class ResponseRendererSpec extends FreeSpec with Matchers with BeforeAndAfterAll
|
|||
|
|
||||
|""", close = false)
|
||||
}
|
||||
|
||||
"to a HEAD request setting a custom Content-Type and Content-Length w/o entity bytes" in new TestSetup() {
|
||||
ResponseRenderingContext(
|
||||
requestMethod = HttpMethods.HEAD,
|
||||
response = HttpResponse(
|
||||
headers = List(Age(30)),
|
||||
entity = HttpEntity.Default(ContentTypes.`text/plain(UTF-8)`, 100, Source.empty))) should renderTo(
|
||||
"""HTTP/1.1 200 OK
|
||||
|Age: 30
|
||||
|Server: akka-http/1.0.0
|
||||
|Date: Thu, 25 Aug 2011 09:10:29 GMT
|
||||
|Content-Type: text/plain; charset=UTF-8
|
||||
|Content-Length: 100
|
||||
|
|
||||
|""", close = false)
|
||||
}
|
||||
}
|
||||
|
||||
"a response with a Strict body," - {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue