add unit test to get default document category defined on database (#11665)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10220 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-08-21 13:45:40 +00:00
parent 02fb4c3b2c
commit 185ab2a020
1 changed files with 6 additions and 0 deletions

View File

@ -32,4 +32,10 @@ class DocumentCategoryTest < ActiveSupport::TestCase
def test_option_name
assert_equal :enumeration_doc_categories, DocumentCategory.new.option_name
end
def test_default
e = Enumeration.find_by_name('Technical documentation')
e.update_attributes(:is_default => true)
assert_equal 3, DocumentCategory.default.id
end
end