java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java | 8
++++++++
1 file changed, 8 insertions(+)
New commits:
commit 50a2c2bba64a682d6b7ffab86f4660149d127548
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Apr 30 17:46:21 2009 -0400
unit test fix
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
b/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
index dd3ca58..f57463c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
@@ -57,6 +57,7 @@ public class DownloadActionTest extends RhnMockStrutsTestCase {
public void testKsDownload() throws Exception {
// /ks/dist/f9-x86_64-distro/images/boot.iso
addRequestParameter("url", "/ks/dist/" + tree.getLabel() +
"/images/boot.iso");
+ request.setQueryString("url=/ks/dist/" + tree.getLabel() +
"/images/boot.iso");
actionPerform();
assertNull(getActualForward());
assertEquals("application/octet-stream",
getResponse().getContentType());
@@ -77,6 +78,7 @@ public class DownloadActionTest extends RhnMockStrutsTestCase {
TestUtils.saveAndFlush(p);
addRequestParameter("url", "/ks/dist/" + tree.getLabel() +
"/Server/" + fileName);
+ request.setQueryString("url=/ks/dist/" + tree.getLabel() +
"/Server/" + fileName);
actionPerform();
// assertEquals("/kickstart/DownloadFile.do", getActualForward());
assertNotNull(request.getAttribute("params"));
@@ -94,6 +96,9 @@ public class DownloadActionTest extends RhnMockStrutsTestCase {
addRequestParameter("url", "/ks/dist/session/" +
encodedSession + "/" +
tree.getLabel() + "/images/boot.iso");
+ request.setQueryString("url=/ks/dist/session/" + encodedSession +
"/" +
+ tree.getLabel() + "/images/boot.iso");
+
actionPerform();
assertNull(getActualForward());
assertNotNull(request.getAttribute("params"));
@@ -119,6 +124,8 @@ public class DownloadActionTest extends RhnMockStrutsTestCase {
addRequestParameter("url", "/ks/dist/session/" +
encodedSession + "/" +
tree.getLabel() + "/Server/" + fileName);
+ request.setQueryString("url=/ks/dist/session/" + encodedSession +
"/" +
+ tree.getLabel() + "/Server/" + fileName);
actionPerform();
assertNotNull(request.getAttribute("params"));
@@ -136,6 +143,7 @@ public class DownloadActionTest extends RhnMockStrutsTestCase {
KickstartSessionTest.createKickstartSession(ksdata, user);
TestUtils.saveAndFlush(ksession);
addRequestParameter("url", "/ks/dist/" + tree.getLabel() +
"/images/");
+ request.setQueryString("url=/ks/dist/" + tree.getLabel() +
"/images/");
actionPerform();
assertNull(getActualForward());
assertEquals("text/plain", getResponse().getContentType());
Show replies by thread