diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-25 16:43:18 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-25 16:43:18 +0000 |
commit | 235238b5834da03dc11d511d7e57c79510a9d5da (patch) | |
tree | 05bcea67427f04d07a705ff9f17c6064357f38fe /test/unit/project_test.rb | |
parent | 73500a349ba8c312312be67aa8cd4547a5717661 (diff) | |
download | redmine-235238b5834da03dc11d511d7e57c79510a9d5da.tar.gz redmine-235238b5834da03dc11d511d7e57c79510a9d5da.zip |
Fixed that project identifier can always be updated (#11028).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9710 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r-- | test/unit/project_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index d8f1b1d90..39ed5d058 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -106,6 +106,20 @@ class ProjectTest < ActiveSupport::TestCase end end + def test_identifier_should_not_be_frozen_for_a_new_project + assert_equal false, Project.new.identifier_frozen? + end + + def test_identifier_should_not_be_frozen_for_a_saved_project_with_blank_identifier + Project.update_all(["identifier = ''"], "id = 1") + + assert_equal false, Project.find(1).identifier_frozen? + end + + def test_identifier_should_be_frozen_for_a_saved_project_with_valid_identifier + assert_equal true, Project.find(1).identifier_frozen? + end + def test_members_should_be_active_users Project.all.each do |project| assert_nil project.members.detect {|m| !(m.user.is_a?(User) && m.user.active?) } |