Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn225 authored Jan 23, 2025
1 parent 0e0f746 commit a9dd62f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions zio-http/jvm/src/test/scala/zio/http/endpoint/NotFoundSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object NotFoundSpec extends ZIOHttpSpec {
},
test("on wrong method") {
check(Gen.int, Gen.int, Gen.alphaNumericString) { (userId, postId, name) =>
val testRoutes = test405(
val testRoutes = test404(
Routes(
Endpoint(GET / "users" / int("userId"))
.out[String]
Expand Down Expand Up @@ -87,15 +87,3 @@ object NotFoundSpec extends ZIOHttpSpec {
result = response.status == Status.NotFound
} yield assertTrue(result)
}

def test405[R](service: Routes[R, Nothing])(
url: String,
method: Method,
): ZIO[R, Response, TestResult] = {
val request = Request(method = method, url = URL.decode(url).toOption.get)
for {
response <- service.runZIO(request)
result = response.status == Status.MethodNotAllowed
} yield assertTrue(result)
}
}

0 comments on commit a9dd62f

Please sign in to comment.