From: Toshi MARUYAMA Date: Tue, 21 Aug 2012 13:45:40 +0000 (+0000) Subject: add unit test to get default document category defined on database (#11665) X-Git-Tag: 2.1.0~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=185ab2a0209c5b748a8f7568d7ed618a81bc5cff;p=redmine.git 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 --- diff --git a/test/unit/document_category_test.rb b/test/unit/document_category_test.rb index cbdd46fc3..d3d3978bf 100644 --- a/test/unit/document_category_test.rb +++ b/test/unit/document_category_test.rb @@ -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