@@ -1,6 +1,6 | |||||
1 | <h2><%= l(:label_spent_time) %></h2> |
|
1 | <h2><%= l(:label_spent_time) %></h2> | |
2 |
|
2 | |||
3 |
<%= labelled_form_for @time_entry, :url => |
|
3 | <%= labelled_form_for @time_entry, :url => time_entry_path(@time_entry) do |f| %> | |
4 | <%= render :partial => 'form', :locals => {:f => f} %> |
|
4 | <%= render :partial => 'form', :locals => {:f => f} %> | |
5 | <%= submit_tag l(:button_save) %> |
|
5 | <%= submit_tag l(:button_save) %> | |
6 | <% end %> |
|
6 | <% end %> |
@@ -126,7 +126,7 Rails.application.routes.draw do | |||||
126 | get 'versions', :to => 'versions#index' |
|
126 | get 'versions', :to => 'versions#index' | |
127 |
|
127 | |||
128 | resources :news, :except => [:show, :edit, :update, :destroy] |
|
128 | resources :news, :except => [:show, :edit, :update, :destroy] | |
129 | resources :time_entries, :controller => 'timelog' do |
|
129 | resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do | |
130 | get 'report', :on => :collection |
|
130 | get 'report', :on => :collection | |
131 | end |
|
131 | end | |
132 | resources :queries, :only => [:new, :create] |
|
132 | resources :queries, :only => [:new, :create] | |
@@ -171,7 +171,7 Rails.application.routes.draw do | |||||
171 | match 'bulk_edit', :via => [:get, :post] |
|
171 | match 'bulk_edit', :via => [:get, :post] | |
172 | post 'bulk_update' |
|
172 | post 'bulk_update' | |
173 | end |
|
173 | end | |
174 | resources :time_entries, :controller => 'timelog' do |
|
174 | resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do | |
175 | collection do |
|
175 | collection do | |
176 | get 'report' |
|
176 | get 'report' | |
177 | end |
|
177 | end |
@@ -100,8 +100,7 class TimelogControllerTest < ActionController::TestCase | |||||
100 | get :edit, :id => 2, :project_id => nil |
|
100 | get :edit, :id => 2, :project_id => nil | |
101 | assert_response :success |
|
101 | assert_response :success | |
102 | assert_template 'edit' |
|
102 | assert_template 'edit' | |
103 | # Default activity selected |
|
103 | assert_tag :tag => 'form', :attributes => { :action => '/time_entries/2' } | |
104 | assert_tag :tag => 'form', :attributes => { :action => '/projects/ecookbook/time_entries/2' } |
|
|||
105 | end |
|
104 | end | |
106 |
|
105 | |||
107 | def test_get_edit_with_an_existing_time_entry_with_inactive_activity |
|
106 | def test_get_edit_with_an_existing_time_entry_with_inactive_activity |
@@ -36,11 +36,6 class RoutingTimelogsTest < Redmine::RoutingTest | |||||
36 | should_route 'GET /projects/foo/time_entries.atom' => 'timelog#index', :project_id => 'foo', :format => 'atom' |
|
36 | should_route 'GET /projects/foo/time_entries.atom' => 'timelog#index', :project_id => 'foo', :format => 'atom' | |
37 | should_route 'GET /projects/foo/time_entries/new' => 'timelog#new', :project_id => 'foo' |
|
37 | should_route 'GET /projects/foo/time_entries/new' => 'timelog#new', :project_id => 'foo' | |
38 | should_route 'POST /projects/foo/time_entries' => 'timelog#create', :project_id => 'foo' |
|
38 | should_route 'POST /projects/foo/time_entries' => 'timelog#create', :project_id => 'foo' | |
39 |
|
||||
40 | # TODO: unused? |
|
|||
41 | should_route 'GET /projects/foo/time_entries/22/edit' => 'timelog#edit', :project_id => 'foo', :id => '22' |
|
|||
42 | should_route 'PUT /projects/foo/time_entries/22' => 'timelog#update', :project_id => 'foo', :id => '22' |
|
|||
43 | should_route 'DELETE /projects/foo/time_entries/22' => 'timelog#destroy', :project_id => 'foo', :id => '22' |
|
|||
44 | end |
|
39 | end | |
45 |
|
40 | |||
46 | def test_timelogs_scoped_under_issues |
|
41 | def test_timelogs_scoped_under_issues | |
@@ -49,11 +44,6 class RoutingTimelogsTest < Redmine::RoutingTest | |||||
49 | should_route 'GET /issues/234/time_entries.atom' => 'timelog#index', :issue_id => '234', :format => 'atom' |
|
44 | should_route 'GET /issues/234/time_entries.atom' => 'timelog#index', :issue_id => '234', :format => 'atom' | |
50 | should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234' |
|
45 | should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234' | |
51 | should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234' |
|
46 | should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234' | |
52 |
|
||||
53 | # TODO: unused? |
|
|||
54 | should_route 'GET /issues/234/time_entries/22/edit' => 'timelog#edit', :issue_id => '234', :id => '22' |
|
|||
55 | should_route 'PUT /issues/234/time_entries/22' => 'timelog#update', :issue_id => '234', :id => '22' |
|
|||
56 | should_route 'DELETE /issues/234/time_entries/22' => 'timelog#destroy', :issue_id => '234', :id => '22' |
|
|||
57 | end |
|
47 | end | |
58 |
|
48 | |||
59 | def test_timelogs_report |
|
49 | def test_timelogs_report |
General Comments 0
You need to be logged in to leave comments.
Login now