-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #441 from jsmrcka/feat/resteasy-accept-header
Add coverage for case-insensitive HTTP `Accept` header
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...nimum-reactive/src/test/java/io/quarkus/ts/http/minimum/reactive/HttpCustomHeadersIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.quarkus.ts.http.minimum.reactive; | ||
|
||
import static io.restassured.RestAssured.given; | ||
import static org.hamcrest.CoreMatchers.is; | ||
|
||
import org.apache.http.HttpStatus; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import io.quarkus.test.scenarios.QuarkusScenario; | ||
|
||
@Tag("QUARKUS-1574") | ||
@QuarkusScenario | ||
public class HttpCustomHeadersIT { | ||
|
||
@Test | ||
public void caseInsensitiveAcceptHeader() { | ||
given() | ||
.accept("Application/json") | ||
.get("/api/hello") | ||
.then() | ||
.statusCode(HttpStatus.SC_OK) | ||
.body("content", is("Hello, World!")); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
http/http-minimum/src/test/java/io/quarkus/ts/http/minimum/HttpCustomHeadersIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.quarkus.ts.http.minimum; | ||
|
||
import static io.restassured.RestAssured.given; | ||
import static org.hamcrest.CoreMatchers.is; | ||
|
||
import org.apache.http.HttpStatus; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import io.quarkus.test.scenarios.QuarkusScenario; | ||
|
||
@Tag("QUARKUS-1574") | ||
@QuarkusScenario | ||
public class HttpCustomHeadersIT { | ||
|
||
@Test | ||
public void caseInsensitiveAcceptHeader() { | ||
given() | ||
.accept("Application/json") | ||
.get("/api/hello") | ||
.then() | ||
.statusCode(HttpStatus.SC_OK) | ||
.body("content", is("Hello, World!")); | ||
} | ||
} |