##// END OF EJS Templates
Adds a link on "My Page" to view all my spent time (#13157)....
Jean-Philippe Lang -
r11629:6b03c741acfc
parent child
Show More
@@ -1,4 +1,7
1 <h3><%=l(:label_spent_time)%> (<%= l(:label_last_n_days, 7) %>)</h3>
1 <h3>
2 <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
3 (<%= l(:label_last_n_days, 7) %>)
4 </h3>
2 <%
5 <%
3 entries = timelog_items
6 entries = timelog_items
4 entries_by_day = entries.group_by(&:spent_on)
7 entries_by_day = entries.group_by(&:spent_on)
@@ -429,6 +429,14 class TimelogControllerTest < ActionController::TestCase
429 assert_tag 'a', :attributes => {:href => '/time_entries/new'}, :content => /Log time/
429 assert_tag 'a', :attributes => {:href => '/time_entries/new'}, :content => /Log time/
430 end
430 end
431
431
432 def test_index_my_spent_time
433 @request.session[:user_id] = 2
434 get :index, :user_id => 'me'
435 assert_response :success
436 assert_template 'index'
437 assert assigns(:entries).all? {|entry| entry.user_id == 2}
438 end
439
432 def test_index_at_project_level
440 def test_index_at_project_level
433 get :index, :project_id => 'ecookbook'
441 get :index, :project_id => 'ecookbook'
434 assert_response :success
442 assert_response :success
General Comments 0
You need to be logged in to leave comments. Login now