summaryrefslogtreecommitdiffstats
path: root/test/functional/my_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-07-11 14:51:07 +0000
committerGo MAEDA <maeda@farend.jp>2018-07-11 14:51:07 +0000
commit87a671ce75fd2b1d402b96df4fb92f55e6009fd4 (patch)
tree1897e3d21c4569f55c8aa70dfd2913c0754c1734 /test/functional/my_controller_test.rb
parent3a894f3a9112fcba80fc95d4edf17c5783bcdbdb (diff)
downloadredmine-87a671ce75fd2b1d402b96df4fb92f55e6009fd4.tar.gz
redmine-87a671ce75fd2b1d402b96df4fb92f55e6009fd4.zip
Add my activities to my page (#2471).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17443 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/my_controller_test.rb')
-rw-r--r--test/functional/my_controller_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index 6a618c4a3..026129399 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -198,6 +198,24 @@ class MyControllerTest < Redmine::ControllerTest
end
end
+ def test_page_with_activity
+ user = User.find(2)
+ user.pref.my_page_layout = {'top' => ['activity']}
+ user.pref.save!
+
+ get :page
+ assert_response :success
+
+ assert_select 'div#block-activity' do
+ assert_select 'h3' do
+ assert_select 'a[href=?]', activity_path(from: Date.today, user_id: user.id), :text => 'Activity'
+ end
+ assert_select 'div#activity' do
+ assert_select 'dt', 10
+ end
+ end
+ end
+
def test_page_with_all_blocks
blocks = Redmine::MyPage.blocks.keys
preferences = User.find(2).pref