@@ -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 | 6 | entries = timelog_items |
|
4 | 7 | entries_by_day = entries.group_by(&:spent_on) |
@@ -429,6 +429,14 class TimelogControllerTest < ActionController::TestCase | |||
|
429 | 429 | assert_tag 'a', :attributes => {:href => '/time_entries/new'}, :content => /Log time/ |
|
430 | 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 | 440 | def test_index_at_project_level |
|
433 | 441 | get :index, :project_id => 'ecookbook' |
|
434 | 442 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now