Do not consider that versions that are due today are completed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10397 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ff0989a702
commit
a81da3491e
|
@ -91,7 +91,7 @@ class Version < ActiveRecord::Base
|
|||
|
||||
# Returns true if the version is completed: due date reached and no open issues
|
||||
def completed?
|
||||
effective_date && (effective_date <= Date.today) && (open_issues_count == 0)
|
||||
effective_date && (effective_date < Date.today) && (open_issues_count == 0)
|
||||
end
|
||||
|
||||
def behind_schedule?
|
||||
|
|
|
@ -119,6 +119,11 @@ class VersionTest < ActiveSupport::TestCase
|
|||
assert_equal [v5, v3, v1, v2, v4], Version.sorted.all
|
||||
end
|
||||
|
||||
def test_completed_should_be_false_when_due_today
|
||||
version = Version.create!(:project_id => 1, :effective_date => Date.today, :name => 'Due today')
|
||||
assert_equal false, version.completed?
|
||||
end
|
||||
|
||||
context "#behind_schedule?" do
|
||||
setup do
|
||||
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
||||
|
|
Loading…
Reference in New Issue