From b72fd8b19e3770d9f7620ecda435a9c3dc192dfd Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 25 Jun 2019 07:35:14 +0000 Subject: [PATCH] test_previous_project_index fails depending on the current time and zone (#30288, #31620). Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@18316 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/activities_controller_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index c94a9c939..5b0cf9d02 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -50,13 +50,14 @@ class ActivitiesControllerTest < Redmine::ControllerTest end def test_previous_project_index + @request.session[:user_id] = 1 get :index, :params => { :id => 1, :from => 2.days.ago.to_date } assert_response :success - assert_select 'h3', :text => /#{3.days.ago.to_date.day}/ + assert_select 'h3', :text => /#{User.current.time_to_date(3.days.ago).day}/ assert_select 'dl dt.issue a', :text => /Cannot print recipes/ end