summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-18 07:39:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-18 07:39:26 +0000
commit6b03c741acfced92544d536e7682b1cb43746669 (patch)
tree33da2f703338ed9f0078775d8f45f0906b26c736 /test/functional/timelog_controller_test.rb
parent45a9b9954af188df5284d18239e05b4b162b31fc (diff)
downloadredmine-6b03c741acfced92544d536e7682b1cb43746669.tar.gz
redmine-6b03c741acfced92544d536e7682b1cb43746669.zip
Adds a link on "My Page" to view all my spent time (#13157).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11859 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r--test/functional/timelog_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 7b9c9e891..2cc9bf778 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -429,6 +429,14 @@ class TimelogControllerTest < ActionController::TestCase
assert_tag 'a', :attributes => {:href => '/time_entries/new'}, :content => /Log time/
end
+ def test_index_my_spent_time
+ @request.session[:user_id] = 2
+ get :index, :user_id => 'me'
+ assert_response :success
+ assert_template 'index'
+ assert assigns(:entries).all? {|entry| entry.user_id == 2}
+ end
+
def test_index_at_project_level
get :index, :project_id => 'ecookbook'
assert_response :success