Skip to content

Commit

Permalink
Fix flaky AuthSpec (#3164)
Browse files Browse the repository at this point in the history
  • Loading branch information
987Nabil committed Sep 26, 2024
1 parent 502331c commit 547e46a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zio-http/jvm/src/test/scala/zio/http/endpoint/AuthSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ object AuthSpec extends ZIOSpecDefault {
},
test("Auth basic or bearer with context and endpoint client") {
val endpoint =
Endpoint(Method.GET / "test" / "multiAuth")
Endpoint(Method.GET / "multiAuth")
.out[String](MediaType.text.`plain`)
.auth(AuthType.Basic | AuthType.Bearer)
val routes =
Expand Down Expand Up @@ -188,7 +188,7 @@ object AuthSpec extends ZIOSpecDefault {
} yield assertTrue(responseBasic == "admin" && responseBearer == "bearer-admin")
},
test("Auth from query parameter with context and endpoint client") {
val endpoint = Endpoint(Method.GET / "test" / "query")
val endpoint = Endpoint(Method.GET / "query")
.out[String](MediaType.text.`plain`)
.auth(AuthType.Custom(HttpCodec.query[String]("token")))
val routes =
Expand All @@ -214,7 +214,7 @@ object AuthSpec extends ZIOSpecDefault {
},
test("Auth with context and endpoint client with path parameter") {
val endpoint =
Endpoint(Method.GET / "test" / int("a")).out[String](MediaType.text.`plain`).auth(AuthType.Basic)
Endpoint(Method.GET / int("a")).out[String](MediaType.text.`plain`).auth(AuthType.Basic)
val routes =
Routes(
endpoint.implementHandler(handler((_: Int) => withContext((ctx: AuthContext) => ctx.value))),
Expand Down

0 comments on commit 547e46a

Please sign in to comment.