summaryrefslogtreecommitdiffstats
path: root/test/functional/my_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-06-25 00:02:17 +0000
committerGo MAEDA <maeda@farend.jp>2019-06-25 00:02:17 +0000
commit282ddf0ee83149820b93a7d1f91f819607e9b659 (patch)
treebac776d450c80a8a28e76ce0312855398a1cf499 /test/functional/my_controller_test.rb
parent5d7088c8abd403d9d8dc8f832be2e39289ca6915 (diff)
downloadredmine-282ddf0ee83149820b93a7d1f91f819607e9b659.tar.gz
redmine-282ddf0ee83149820b93a7d1f91f819607e9b659.zip
test_page_with_activity fails depending on the current time and zone (#30288).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@18315 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/my_controller_test.rb')
-rw-r--r--test/functional/my_controller_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index 069cfdc33..42a028d40 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -204,6 +204,7 @@ class MyControllerTest < Redmine::ControllerTest
def test_page_with_activity
user = User.find(2)
user.pref.my_page_layout = {'top' => ['activity']}
+ user.pref.time_zone = 'UTC'
user.pref.save!
get :page
@@ -211,7 +212,7 @@ class MyControllerTest < Redmine::ControllerTest
assert_select 'div#block-activity' do
assert_select 'h3' do
- assert_select 'a[href=?]', activity_path(from: Date.current, user_id: user.id), :text => 'Activity'
+ assert_select 'a[href=?]', activity_path(from: User.current.today, user_id: user.id), :text => 'Activity'
end
assert_select 'div#activity' do
assert_select 'dt', 10