You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2018/10/29 14:03:13 UTC
[myfaces] branch 2.2.x updated: added unittest
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.2.x by this push:
new 39cf9ea added unittest
39cf9ea is described below
commit 39cf9eae98d6b7f6abdbfb9c7f22e6d4a42cd9d0
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Mon Oct 29 15:03:07 2018 +0100
added unittest
---
.../context/servlet/ServletExternalContextImplTest.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/impl/src/test/java/org/apache/myfaces/context/servlet/ServletExternalContextImplTest.java b/impl/src/test/java/org/apache/myfaces/context/servlet/ServletExternalContextImplTest.java
index 0bd0929..4bdc173 100644
--- a/impl/src/test/java/org/apache/myfaces/context/servlet/ServletExternalContextImplTest.java
+++ b/impl/src/test/java/org/apache/myfaces/context/servlet/ServletExternalContextImplTest.java
@@ -140,4 +140,17 @@ public class ServletExternalContextImplTest extends AbstractJsfTestCase
}
+ @Test
+ public void testSameParameterNames()
+ {
+ String baseUrl = "/test?par=test1&par=test2";
+
+ // encode that URL without adding further parameters
+ final String redirectUrl = _testExternalContext.encodeRedirectURL(baseUrl, null);
+
+ // the URL should not change
+ Assert.assertTrue(redirectUrl.contains("par=test1"));
+ Assert.assertTrue(redirectUrl.contains("par=test2"));
+
+ }
}