Skip to content

Commit

Permalink
test: removes redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Iommi committed Nov 23, 2024
1 parent f181521 commit a3f933d
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,21 +314,6 @@ class CorsFilterSpec extends Specification {
HttpStatus.OK == response.status()
}

@Property(name = "micronaut.server.cors.configurations.foo.allowed-origins", value = "http://www.foo.com")
@Property(name = "micronaut.server.cors.configurations.foo.allowed-methods", value = "GET")
void "A preflight request is rejected for a route that does exist but doesn't handle the requested HTTP Method"() {
given:
HttpRequest request = HttpRequest.OPTIONS("/example")
.header(HttpHeaders.ORIGIN, 'http://www.foo.com')
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, 'POST')

when:
HttpResponse<?> response = execute(request)

then:
HttpStatus.FORBIDDEN == response.status()
}

@Requires(property = "spec.name", value = "CorsFilterSpec")
@Controller
static class TestController{
Expand Down

0 comments on commit a3f933d

Please sign in to comment.