summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-09 09:10:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-09 09:10:24 +0000
commit5e5506587e95b1981b7e913bf4e6b7b61c304bde (patch)
tree6ef39cbcad19ac2df552ab9a99ad78c5a3c0579c /test/unit
parentf5702c35df38c5609b5956fe86ef176cb0643ed0 (diff)
downloadredmine-5e5506587e95b1981b7e913bf4e6b7b61c304bde.tar.gz
redmine-5e5506587e95b1981b7e913bf4e6b7b61c304bde.zip
Closed versions should be marked as completed (#21433).
git-svn-id: http://svn.redmine.org/redmine/trunk@15019 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/version_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/version_test.rb b/test/unit/version_test.rb
index b61061b85..15d6816fd 100644
--- a/test/unit/version_test.rb
+++ b/test/unit/version_test.rb
@@ -138,6 +138,11 @@ class VersionTest < ActiveSupport::TestCase
assert_equal false, version.completed?
end
+ def test_completed_should_be_true_when_closed
+ version = Version.create!(:project_id => 1, :status => 'closed', :name => 'Closed')
+ assert_equal true, version.completed?
+ end
+
test "#behind_schedule? should be false if there are no issues assigned" do
version = Version.generate!(:effective_date => Date.yesterday)
assert_equal false, version.behind_schedule?