Add rawStatusCode() to ServerResponse in both WebFlux and Servlet
Closes gh-22872
This commit is contained in:
@@ -81,6 +81,7 @@ public class DefaultEntityResponseBuilderTests {
|
||||
EntityResponse.fromObject(body).status(HttpStatus.CREATED).build();
|
||||
|
||||
assertThat(result.statusCode()).isEqualTo(HttpStatus.CREATED);
|
||||
assertThat(result.rawStatusCode()).isEqualTo(201);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -67,6 +67,7 @@ public class DefaultServerResponseBuilderTests {
|
||||
public void status() {
|
||||
ServerResponse response = ServerResponse.status(HttpStatus.CREATED).build();
|
||||
assertThat(response.statusCode()).isEqualTo(HttpStatus.CREATED);
|
||||
assertThat(response.rawStatusCode()).isEqualTo(201);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user