|
|
|
|
@ -136,6 +136,13 @@ class WebMvcTagsTests {
@@ -136,6 +136,13 @@ class WebMvcTagsTests {
|
|
|
|
|
assertThat(tag.getValue()).isEqualTo("CLIENT_ERROR"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void outcomeTagIsClientErrorWhenResponseIsNonStandardInClientSeries() { |
|
|
|
|
this.response.setStatus(490); |
|
|
|
|
Tag tag = WebMvcTags.outcome(this.response); |
|
|
|
|
assertThat(tag.getValue()).isEqualTo("CLIENT_ERROR"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void outcomeTagIsServerErrorWhenResponseIs5xx() { |
|
|
|
|
this.response.setStatus(500); |
|
|
|
|
@ -143,4 +150,11 @@ class WebMvcTagsTests {
@@ -143,4 +150,11 @@ class WebMvcTagsTests {
|
|
|
|
|
assertThat(tag.getValue()).isEqualTo("SERVER_ERROR"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void outcomeTagIsUnknownWhenResponseStatusIsInUnknownSeries() { |
|
|
|
|
this.response.setStatus(701); |
|
|
|
|
Tag tag = WebMvcTags.outcome(this.response); |
|
|
|
|
assertThat(tag.getValue()).isEqualTo("UNKNOWN"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|