summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-24 18:23:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-24 18:23:58 +0000
commit528735b955abd70aa76eefdfa9929447679f3b89 (patch)
treea0e6c065a580cff2c80388b7481ed686dc7157ab /test
parent55a8087f674b81bfc31192ce2e123108af0ea5d1 (diff)
downloadredmine-528735b955abd70aa76eefdfa9929447679f3b89.tar.gz
redmine-528735b955abd70aa76eefdfa9929447679f3b89.zip
Use subclasses method instead of class variable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8977 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/enumeration_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/enumeration_test.rb b/test/unit/enumeration_test.rb
index 5c03dc2fa..56be566e7 100644
--- a/test/unit/enumeration_test.rb
+++ b/test/unit/enumeration_test.rb
@@ -108,4 +108,15 @@ class EnumerationTest < ActiveSupport::TestCase
enumeration.parent = Enumeration.find(5)
assert enumeration.is_override?
end
+
+ def test_get_subclasses
+ classes = Enumeration.get_subclasses
+ assert_include IssuePriority, classes
+ assert_include DocumentCategory, classes
+ assert_include TimeEntryActivity, classes
+
+ classes.each do |klass|
+ assert_equal Enumeration, klass.superclass
+ end
+ end
end