whiteship 2014-01-16
fixed broken tests
@738a97566897fb2d677cf06695662ab03e5d8e82
conf/test-data.yml
--- conf/test-data.yml
+++ conf/test-data.yml
@@ -3,6 +3,7 @@
     - !!models.User
         name:           Yobi
         loginId:        yobi
+        state:          ACTIVE
         password:       ys9gr1Xet/DL9RpmgczOlJg+txPvqnZCaw/z55gb0KU=
         passwordSalt:   '[B@1032a4'
         email:          yobi@yobi.io
test/controllers/SiteAppTest.java
--- test/controllers/SiteAppTest.java
+++ test/controllers/SiteAppTest.java
@@ -50,7 +50,7 @@
 
         //When
         callAction(
-                controllers.routes.ref.SiteApp.toggleAccountLock(loginId),
+                controllers.routes.ref.SiteApp.toggleAccountLock(loginId, "", ""),
                 fakeRequest()
                         .withFormUrlEncodedBody(data)
                         .withSession("loginId", "admin")
test/models/UserTest.java
--- test/models/UserTest.java
+++ test/models/UserTest.java
@@ -5,9 +5,11 @@
 import java.util.List;
 import java.util.Map;
 
+import models.enumeration.UserState;
 import org.junit.Test;
 
 import com.avaje.ebean.Page;
+import org.omg.PortableInterceptor.ACTIVE;
 import play.data.validation.Validation;
 
 public class UserTest extends ModelTest<User> {
@@ -84,7 +86,7 @@
 	public void findUsers() throws Exception {
 	    // Given
 	    // When
-	    Page<User> searchUsers = User.findUsers(0, "yo");
+	    Page<User> searchUsers = User.findUsers(0, "yobi", UserState.ACTIVE);
 	    // Then
 	    assertThat(searchUsers.getTotalRowCount()).isEqualTo(1);
 	}
Add a comment
List