]> source.dussan.org Git - redmine.git/commitdiff
fix test_global_index of functional activities controller test fails around UTC 00:00
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 19 Jun 2012 00:43:10 +0000 (00:43 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 19 Jun 2012 00:43:10 +0000 (00:43 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9871 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/activities_controller_test.rb

index 126119bc169219505d2a63a24b7960d97b297fb3..eb277098277d7ccf3d402346f4c0b4437e09a306 100644 (file)
@@ -55,13 +55,16 @@ class ActivitiesControllerTest < ActionController::TestCase
   end
 
   def test_global_index
+    @request.session[:user_id] = 1
     get :index
     assert_response :success
     assert_template 'index'
     assert_not_nil assigns(:events_by_day)
 
+    i5 = Issue.find(5)
+    d5 = User.find(1).time_to_date(i5.created_on)
     assert_tag :tag => "h3",
-               :content => /#{5.day.ago.to_date.day}/,
+               :content => /#{d5.day}/,
                :sibling => { :tag => "dl",
                  :child => { :tag => "dt",
                    :attributes => { :class => /issue/ },