diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-31 12:59:57 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-31 12:59:57 +0000 |
commit | dbad26c87db8247c0d635c993981d4277e165978 (patch) | |
tree | 331b8029e1f6c02c5812033b7080281a6a0fbc60 /test | |
parent | 25b4139028696d4f4fb057f598a771aca52b7afe (diff) | |
download | redmine-dbad26c87db8247c0d635c993981d4277e165978.tar.gz redmine-dbad26c87db8247c0d635c993981d4277e165978.zip |
Adds an option to generate sequential project identifiers.
Disabled by default, it can be enabled on the 'Projects' tab in application settings.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1777 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/project_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index 91fab8208..6e32c02e7 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -130,4 +130,15 @@ class ProjectTest < Test::Unit::TestCase assert_equal [1, 2, 3], parent.rolled_up_trackers.collect(&:id)
assert_equal [2, 3], child.rolled_up_trackers.collect(&:id)
end
+
+ def test_next_identifier
+ ProjectCustomField.delete_all
+ Project.create!(:name => 'last', :identifier => 'p2008040')
+ assert_equal 'p2008041', Project.next_identifier
+ end
+
+ def test_next_identifier_first_project
+ Project.delete_all
+ assert_nil Project.next_identifier
+ end
end
|