##// END OF EJS Templates
Fixes default data loader broken by r2777 (#3507)....
Jean-Philippe Lang -
r2692:72a396227ac5
parent child
Show More
@@ -156,17 +156,17 module Redmine
156 156 }
157 157
158 158 # Enumerations
159 Enumeration.create!(:opt => "DCAT", :name => l(:default_doc_category_user), :position => 1)
160 Enumeration.create!(:opt => "DCAT", :name => l(:default_doc_category_tech), :position => 2)
159 DocumentCategory.create!(:opt => "DCAT", :name => l(:default_doc_category_user), :position => 1)
160 DocumentCategory.create!(:opt => "DCAT", :name => l(:default_doc_category_tech), :position => 2)
161 161
162 Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_low), :position => 1)
163 Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_normal), :position => 2, :is_default => true)
164 Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_high), :position => 3)
165 Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_urgent), :position => 4)
166 Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_immediate), :position => 5)
162 IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_low), :position => 1)
163 IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_normal), :position => 2, :is_default => true)
164 IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_high), :position => 3)
165 IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_urgent), :position => 4)
166 IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_immediate), :position => 5)
167 167
168 Enumeration.create!(:opt => "ACTI", :name => l(:default_activity_design), :position => 1)
169 Enumeration.create!(:opt => "ACTI", :name => l(:default_activity_development), :position => 2)
168 TimeEntryActivity.create!(:opt => "ACTI", :name => l(:default_activity_design), :position => 1)
169 TimeEntryActivity.create!(:opt => "ACTI", :name => l(:default_activity_development), :position => 2)
170 170 end
171 171 true
172 172 end
@@ -38,6 +38,9 class DefaultDataTest < Test::Unit::TestCase
38 38 IssueStatus.delete_all
39 39 Enumeration.delete_all
40 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 44 rescue ActiveRecord::RecordInvalid => e
42 45 assert false, ":#{lang} default data is invalid (#{e.message})."
43 46 end
General Comments 0
You need to be logged in to leave comments. Login now