java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
| 13 +++++-----
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 3cc35baa52b612e29a7455349b5d39bbb0d8da2d
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 1 11:01:33 2009 -0400
unit test fixes
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
index 2d8d53a..e8a5486 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
@@ -22,6 +22,7 @@ import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.frontend.action.kickstart.KickstartPackageProfileSetupAction;
import com.redhat.rhn.frontend.dto.ProfileDto;
import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
import com.redhat.rhn.manager.profile.test.ProfileManagerTest;
import com.redhat.rhn.testing.RhnMockStrutsTestCase;
import com.redhat.rhn.testing.TestUtils;
@@ -52,21 +53,21 @@ public class KickstartPackageProfileActionTest extends
RhnMockStrutsTestCase {
user.addRole(RoleFactory.ORG_ADMIN);
setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
actionPerform();
- verifyPageList(ProfileDto.class);
- assertNotNull(request.getAttribute(RequestContext.KICKSTART));
+ assertNotNull(request.getParameter(RequestContext.KICKSTART_ID));
}
public void testSubmit() throws Exception {
assertNull(ksdata.getKickstartDefaults().getProfile());
user.addRole(RoleFactory.ORG_ADMIN);
Profile p = ProfileManagerTest.createProfileWithServer(user);
- addSelectedItem(p.getId());
- addDispatchCall(KickstartPackageProfileSetupAction.UPDATE_METHOD);
- setRequestPathInfo("/kickstart/KickstartPackageProfileEditSubmit");
+ ksdata.getKickstartDefaults().setProfile(p);
+ addDispatchCall(KickstartPackageProfileSetupAction.CLEAR_METHOD);
+ setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
actionPerform();
// Gotta make sure we can update the profile to the same entry twice
actionPerform();
- assertNotNull(ksdata.getKickstartDefaults().getProfile());
+ ksdata = (KickstartData) TestUtils.reload(ksdata);
+ assertNull(ksdata.getKickstartDefaults().getProfile());
setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
// Need to test that the SetupAction works after we
// add the profile to the Kickstart
Show replies by date