From fdd36ce713bbbc0f87f9d6c8b429dc8e809ed8dd Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 11 Jun 2012 04:42:54 +0000 Subject: [PATCH] fix test_user_index of activities controller test fails at Japanese morning and afternoon git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9814 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/activities_controller_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index 3457d4068..126119bc1 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -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/ },