You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/06/12 12:43:57 UTC
[sling-org-apache-sling-servlet-helpers] branch master updated:
SLING-9512 - clarify tests
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlet-helpers.git
The following commit(s) were added to refs/heads/master by this push:
new 6227707 SLING-9512 - clarify tests
6227707 is described below
commit 6227707ab93311c7e829fe13786476d7fbbdaa9b
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Jun 12 14:43:41 2020 +0200
SLING-9512 - clarify tests
---
.../internalrequests/ServletInternalRequestTest.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/test/java/org/apache/sling/servlethelpers/internalrequests/ServletInternalRequestTest.java b/src/test/java/org/apache/sling/servlethelpers/internalrequests/ServletInternalRequestTest.java
index 7605675..57f69e7 100644
--- a/src/test/java/org/apache/sling/servlethelpers/internalrequests/ServletInternalRequestTest.java
+++ b/src/test/java/org/apache/sling/servlethelpers/internalrequests/ServletInternalRequestTest.java
@@ -192,13 +192,22 @@ public class ServletInternalRequestTest {
@Test
public void ignoreNon200Status() throws IOException {
final InternalRequest r = request("/ignore").withRequestMethod("STATUS").execute().checkStatus();
+
assertEquals(451, r.getStatus());
+
+ // This doesn't fail as we have called checkStatus() with no
+ // arguments, meaning "I don't care"
+ r.getResponseAsString();
}
@Test
public void ignoreNon200StatusWithNull() throws IOException {
final InternalRequest r = request("/ignoreAgain").withRequestMethod("STATUS").execute().checkStatus(null);
assertEquals(451, r.getStatus());
+
+ // This doesn't fail as we have called checkStatus() with
+ // null, also meaning "I don't care"
+ r.getResponseAsString();
}
@Test