diff options
Diffstat (limited to 'test/unit/project_test.rb')
-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
|