mirror of
https://github.com/redmine/redmine.git
synced 2024-08-15 02:14:57 +02:00
Fixes default data loader broken by r2777 (#3507).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2792 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2221d68c4d
commit
72a396227a
@ -156,17 +156,17 @@ module Redmine
|
||||
}
|
||||
|
||||
# Enumerations
|
||||
Enumeration.create!(:opt => "DCAT", :name => l(:default_doc_category_user), :position => 1)
|
||||
Enumeration.create!(:opt => "DCAT", :name => l(:default_doc_category_tech), :position => 2)
|
||||
DocumentCategory.create!(:opt => "DCAT", :name => l(:default_doc_category_user), :position => 1)
|
||||
DocumentCategory.create!(:opt => "DCAT", :name => l(:default_doc_category_tech), :position => 2)
|
||||
|
||||
Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_low), :position => 1)
|
||||
Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_normal), :position => 2, :is_default => true)
|
||||
Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_high), :position => 3)
|
||||
Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_urgent), :position => 4)
|
||||
Enumeration.create!(:opt => "IPRI", :name => l(:default_priority_immediate), :position => 5)
|
||||
IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_low), :position => 1)
|
||||
IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_normal), :position => 2, :is_default => true)
|
||||
IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_high), :position => 3)
|
||||
IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_urgent), :position => 4)
|
||||
IssuePriority.create!(:opt => "IPRI", :name => l(:default_priority_immediate), :position => 5)
|
||||
|
||||
Enumeration.create!(:opt => "ACTI", :name => l(:default_activity_design), :position => 1)
|
||||
Enumeration.create!(:opt => "ACTI", :name => l(:default_activity_development), :position => 2)
|
||||
TimeEntryActivity.create!(:opt => "ACTI", :name => l(:default_activity_design), :position => 1)
|
||||
TimeEntryActivity.create!(:opt => "ACTI", :name => l(:default_activity_development), :position => 2)
|
||||
end
|
||||
true
|
||||
end
|
||||
|
@ -38,6 +38,9 @@ class DefaultDataTest < Test::Unit::TestCase
|
||||
IssueStatus.delete_all
|
||||
Enumeration.delete_all
|
||||
assert Redmine::DefaultData::Loader::load(lang)
|
||||
assert_not_nil DocumentCategory.first
|
||||
assert_not_nil IssuePriority.first
|
||||
assert_not_nil TimeEntryActivity.first
|
||||
rescue ActiveRecord::RecordInvalid => e
|
||||
assert false, ":#{lang} default data is invalid (#{e.message})."
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user