[gatein-commits] gatein SVN: r823 - portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Nov 26 14:20:03 EST 2009


Author: thomas.heute at jboss.com
Date: 2009-11-26 14:20:03 -0500 (Thu, 26 Nov 2009)
New Revision: 823

Modified:
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
Log:
GTNPORTAL-306: The User Handler implementation returns a User with a password "null"
Modified the test case


Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java	2009-11-26 19:18:36 UTC (rev 822)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java	2009-11-26 19:20:03 UTC (rev 823)
@@ -83,19 +83,19 @@
       }
    }
 
-   public void testFindUserByUserName() throws Exception
+   public void testChangePassword() throws Exception
    {
       UserHandler uHandler = organizationService.getUserHandler();
       User user = uHandler.findUserByName("root");
       assertNotNull(user);
-      assertEquals("gtn", user.getPassword());
+      assertTrue(uHandler.authenticate("root", "gtn"));
       
       // Test changing password
       user.setPassword("newPassword");
       uHandler.saveUser(user, false);
       user = uHandler.findUserByName("root");
       assertNotNull(user);
-      assertEquals("newPassword", user.getPassword());      
+      assertTrue(uHandler.authenticate("root", "newPassword"));    
 
       // Reset to default password
       user.setPassword("gtn");



More information about the gatein-commits mailing list