Closed versions should be marked as completed (#21433).

git-svn-id: http://svn.redmine.org/redmine/trunk@15019 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-01-09 09:10:24 +00:00
parent f5702c35df
commit 5e5506587e
3 changed files with 8 additions and 3 deletions

View File

@@ -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?