]> source.dussan.org Git - redmine.git/commitdiff
fix test_user_index of activities controller test fails at Japanese morning and afternoon
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 11 Jun 2012 04:42:54 +0000 (04:42 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 11 Jun 2012 04:42:54 +0000 (04:42 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9814 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/activities_controller_test.rb

index 3457d4068a7a399cb184dd9c3a650070e007fb9e..126119bc169219505d2a63a24b7960d97b297fb3 100644 (file)
@@ -73,6 +73,7 @@ class ActivitiesControllerTest < ActionController::TestCase
   end
 
   def test_user_index
+    @request.session[:user_id] = 1
     get :index, :user_id => 2
     assert_response :success
     assert_template 'index'
@@ -80,8 +81,11 @@ class ActivitiesControllerTest < ActionController::TestCase
 
     assert_select 'h2 a[href=/users/2]', :text => 'John Smith'
 
+    i1 = Issue.find(1)
+    d1 = User.find(1).time_to_date(i1.created_on)
+
     assert_tag :tag => "h3",
-               :content => /#{3.day.ago.to_date.day}/,
+               :content => /#{d1.day}/,
                :sibling => { :tag => "dl",
                  :child => { :tag => "dt",
                    :attributes => { :class => /issue/ },