summaryrefslogtreecommitdiffstats
path: root/test/unit/version_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-16 14:09:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-16 14:09:41 +0000
commita81da3491e1b0070e751fa97e192045f894a4291 (patch)
tree2648b8e326426a340544207a194b80c6a3302612 /test/unit/version_test.rb
parentff0989a7022e717e8b200f62ad5c9cdc3b6cc440 (diff)
downloadredmine-a81da3491e1b0070e751fa97e192045f894a4291.tar.gz
redmine-a81da3491e1b0070e751fa97e192045f894a4291.zip
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
Diffstat (limited to 'test/unit/version_test.rb')
-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 d80c3d10f..e9b485479 100644
--- a/test/unit/version_test.rb
+++ b/test/unit/version_test.rb
@@ -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