@@ -156,17 +156,17 module Redmine | |||||
156 | } |
|
156 | } | |
157 |
|
157 | |||
158 | # Enumerations |
|
158 | # Enumerations | |
159 |
|
|
159 | DocumentCategory.create!(:opt => "DCAT", :name => l(:default_doc_category_user), :position => 1) | |
160 |
|
|
160 | DocumentCategory.create!(:opt => "DCAT", :name => l(:default_doc_category_tech), :position => 2) | |
161 |
|
161 | |||
162 |
|
|
162 | IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_low), :position => 1) | |
163 |
|
|
163 | IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_normal), :position => 2, :is_default => true) | |
164 |
|
|
164 | IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_high), :position => 3) | |
165 |
|
|
165 | IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_urgent), :position => 4) | |
166 |
|
|
166 | IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_immediate), :position => 5) | |
167 |
|
167 | |||
168 |
|
|
168 | TimeEntryActivity.create!(:opt => "ACTI", :name => l(:default_activity_design), :position => 1) | |
169 |
|
|
169 | TimeEntryActivity.create!(:opt => "ACTI", :name => l(:default_activity_development), :position => 2) | |
170 | end |
|
170 | end | |
171 | true |
|
171 | true | |
172 | end |
|
172 | end |
@@ -38,6 +38,9 class DefaultDataTest < Test::Unit::TestCase | |||||
38 | IssueStatus.delete_all |
|
38 | IssueStatus.delete_all | |
39 | Enumeration.delete_all |
|
39 | Enumeration.delete_all | |
40 | assert Redmine::DefaultData::Loader::load(lang) |
|
40 | assert Redmine::DefaultData::Loader::load(lang) | |
|
41 | assert_not_nil DocumentCategory.first | |||
|
42 | assert_not_nil IssuePriority.first | |||
|
43 | assert_not_nil TimeEntryActivity.first | |||
41 | rescue ActiveRecord::RecordInvalid => e |
|
44 | rescue ActiveRecord::RecordInvalid => e | |
42 | assert false, ":#{lang} default data is invalid (#{e.message})." |
|
45 | assert false, ":#{lang} default data is invalid (#{e.message})." | |
43 | end |
|
46 | end |
General Comments 0
You need to be logged in to leave comments.
Login now