
fixed broken tests
@738a97566897fb2d677cf06695662ab03e5d8e82
--- conf/test-data.yml
+++ conf/test-data.yml
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 |
- !!models.User |
4 | 4 |
name: Yobi |
5 | 5 |
loginId: yobi |
6 |
+ state: ACTIVE |
|
6 | 7 |
password: ys9gr1Xet/DL9RpmgczOlJg+txPvqnZCaw/z55gb0KU= |
7 | 8 |
passwordSalt: '[B@1032a4' |
8 | 9 |
email: yobi@yobi.io |
--- test/controllers/SiteAppTest.java
+++ test/controllers/SiteAppTest.java
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 |
|
51 | 51 |
//When |
52 | 52 |
callAction( |
53 |
- controllers.routes.ref.SiteApp.toggleAccountLock(loginId), |
|
53 |
+ controllers.routes.ref.SiteApp.toggleAccountLock(loginId, "", ""), |
|
54 | 54 |
fakeRequest() |
55 | 55 |
.withFormUrlEncodedBody(data) |
56 | 56 |
.withSession("loginId", "admin") |
--- test/models/UserTest.java
+++ test/models/UserTest.java
... | ... | @@ -5,9 +5,11 @@ |
5 | 5 |
import java.util.List; |
6 | 6 |
import java.util.Map; |
7 | 7 |
|
8 |
+import models.enumeration.UserState; |
|
8 | 9 |
import org.junit.Test; |
9 | 10 |
|
10 | 11 |
import com.avaje.ebean.Page; |
12 |
+import org.omg.PortableInterceptor.ACTIVE; |
|
11 | 13 |
import play.data.validation.Validation; |
12 | 14 |
|
13 | 15 |
public class UserTest extends ModelTest<User> { |
... | ... | @@ -84,7 +86,7 @@ |
84 | 86 |
public void findUsers() throws Exception { |
85 | 87 |
// Given |
86 | 88 |
// When |
87 |
- Page<User> searchUsers = User.findUsers(0, "yo"); |
|
89 |
+ Page<User> searchUsers = User.findUsers(0, "yobi", UserState.ACTIVE); |
|
88 | 90 |
// Then |
89 | 91 |
assertThat(searchUsers.getTotalRowCount()).isEqualTo(1); |
90 | 92 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?