struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/2] struts git commit: Fixes expected test result
Date Tue, 06 Oct 2015 13:36:43 GMT
Fixes expected test result


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a5812bf0
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a5812bf0
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a5812bf0

Branch: refs/heads/master
Commit: a5812bf0b68b0ffc145f6273e3683b4fc92865fc
Parents: f079738
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Tue Oct 6 15:36:28 2015 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Tue Oct 6 15:36:28 2015 +0200

----------------------------------------------------------------------
 .../views/freemarker/FreemarkerResultMockedTest.java        | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/a5812bf0/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
b/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
index 9794637..2a9fda6 100644
--- a/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
+++ b/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
@@ -102,9 +102,10 @@ public class FreemarkerResultMockedTest extends StrutsInternalTestCase
{
 
         // TODO lukaszlenart: remove expectedJDK15 and if() after switching to Java 1.6
         String expectedJDK17 =
-                "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" foo=\"bar\"
placeholder=\"input\"/>"
-                        + "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" foo=\"bar\"
placeholder=\"input\"/>"
-                        + "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" break=\"true\"/>";
+                "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" placeholder=\"input\"
foo=\"bar\"/>"
+                        + "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" placeholder=\"input\"
foo=\"bar\"/>"
+                        + "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" break=\"true\"/>"
+                        + "<input type=\"text\" name=\"required\" value=\"\" id=\"required\"
required=\"true\"/>";
         String expectedJDK18 =
                 "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" foo=\"bar\"
placeholder=\"input\"/>"
                         + "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" foo=\"bar\"
placeholder=\"input\"/>"
@@ -113,7 +114,7 @@ public class FreemarkerResultMockedTest extends StrutsInternalTestCase
{
 
         String result = stringWriter.toString();
 
-        if (result.contains("id=\"required\"")) {
+        if (result.contains("id=\"test\" foo=\"bar\"")) {
             assertEquals(expectedJDK18, result);
         } else {
             assertEquals(expectedJDK17, result);


Mime
View raw message