]> source.dussan.org Git - redmine.git/commitdiff
fix unit issue test fails on Wednesday
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 31 Oct 2012 10:20:59 +0000 (10:20 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 31 Oct 2012 10:20:59 +0000 (10:20 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10776 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_test.rb

index 1be4c02b63bab181cb6a6efb889083c398c4c84f..777edcf9502a422da7ed450aeba605dae16918bb 100644 (file)
@@ -1378,16 +1378,17 @@ class IssueTest < ActiveSupport::TestCase
   end
 
   def test_rescheduling_a_stale_issue_should_not_raise_an_error
-    stale = Issue.find(1)
-    issue = Issue.find(1)
-    issue.subject = "Updated"
-    issue.save!
-
-    date = 10.days.from_now.to_date
-    assert_nothing_raised do
-      stale.reschedule_on!(date)
+    with_settings :non_working_week_days => [] do
+      stale = Issue.find(1)
+      issue = Issue.find(1)
+      issue.subject = "Updated"
+      issue.save!
+      date = 10.days.from_now.to_date
+      assert_nothing_raised do
+        stale.reschedule_on!(date)
+      end
+      assert_equal date, stale.reload.start_date
     end
-    assert_equal date, stale.reload.start_date
   end
 
   def test_overdue