Yi EungJun 2013-04-17
Fix constraint violation by test-data.yml.
* In test-data.yml, Remove entities already added by initial-data.yml.
* Make Global.insertTestData insert "users" entities.
@7f473f070361ba89369ab99484758cfedc01e569
app/Global.java
--- app/Global.java
+++ app/Global.java
@@ -53,8 +53,8 @@
 
     private static void insertTestData() {
         String[] entityNames = {
-            "projects", "milestones", "issues", "issueComments", "postings",
-            "postingComments", "projectUsers"
+            "users", "projects", "milestones", "issues", "issueComments",
+            "postings", "postingComments", "projectUsers"
         };
 
         insertDataFromYaml("test-data.yml", entityNames);
conf/test-data.yml
--- conf/test-data.yml
+++ conf/test-data.yml
@@ -1,14 +1,6 @@
 # Users
 users:
     - !!models.User
-        name:           Site admin
-        loginId:        admin
-        password:       5v4TVjzLo1bqullT1CU4/bENUNOUfX97WpdunGLvJvw=
-        passwordSalt:   '[B@1032a4'
-        email:          admin@nhn.com
-        avatarUrl:      /assets/images/default-avatar-128.png
-        createdDate:           2012-11-01 08:00:00
-    - !!models.User
         name:           Hobi
         loginId:        hobi
         password:       ys9gr1Xet/DL9RpmgczOlJg+txPvqnZCaw/z55gb0KU=
@@ -40,11 +32,6 @@
         email:          ejlee@nhn.com
         avatarUrl:      /assets/images/default-avatar-128.png
         createdDate:           2012-05-01 08:00:00
-
-siteAdmins:
-     - !!models.SiteAdmin
-        admin:        !!models.User
-                            id: 1
 
 # Projects
 projects:
@@ -340,15 +327,6 @@
         state:      CLOSED
         project:         !!models.Project
                              id: 3
-
-# Role
-roles:
-    - !!models.Role
-        name:           manager
-        active:         true
-    - !!models.Role
-        name:           member
-        active:         true
 
 # ProjectUser
 projectUsers:
Add a comment
List