Skip to content

Commit

Permalink
Cache Control
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 committed Sep 25, 2024
1 parent b9620cf commit ff799ef
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions zio-http/jvm/src/test/scala/zio/http/ConformanceSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -631,21 +631,19 @@ object ConformanceSpec extends ZIOHttpSpec {
for {
response <- app.runZIO(Request.get("/test"))
} yield assertTrue(
response.headers.count(
_._1 == Header.XFrameOptions.name,
) == 1,
response.headers.values(Header.XFrameOptions.name).length == 1,
)
},
),
suite("cache-control")(
test("Cache-Control should not have quoted string for max-age directive(response_directive_max_age)") {
val validResponse = Response
.status(Status.Ok)
.addHeader(Header.CacheControl.MaxAge(5))
.addHeader(Header.CacheControl.MaxAge(5))

val invalidResponse = Response
.status(Status.Ok)
.addHeader(Header.Custom("Cache-Control", """max-age="5""""))
.addHeader(Header.Custom("Cache-Control", """max-age="5""""))

val app = Routes(
Method.GET / "valid" -> Handler.fromResponse(validResponse),
Expand Down

0 comments on commit ff799ef

Please sign in to comment.