mirror of
https://github.com/redmine/redmine.git
synced 2026-03-21 03:42:05 +01:00
Merged r10230 from trunk (#11665)
add check default document category is not defined on database in tests. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@10233 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -34,12 +34,14 @@ class DocumentCategoryTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def test_default
|
||||
assert_nil DocumentCategory.find(:first, :conditions => { :is_default => true })
|
||||
e = Enumeration.find_by_name('Technical documentation')
|
||||
e.update_attributes(:is_default => true)
|
||||
assert_equal 3, DocumentCategory.default.id
|
||||
end
|
||||
|
||||
def test_force_default
|
||||
assert_nil DocumentCategory.find(:first, :conditions => { :is_default => true })
|
||||
assert_equal 1, DocumentCategory.default.id
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user