From aedd5c5e35eb8fbac64b9c1dbf0e754ec4fbe31a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Aug 2012 17:15:16 +0000 Subject: [PATCH] Merged r10220 from trunk to 1.4-stable (#11665) add unit test to get default document category defined on database. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@10224 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/document_category_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/document_category_test.rb b/test/unit/document_category_test.rb index 4d677628c..452ab1aa0 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