@@ -6,7 +6,7 | |||||
6 | </p> |
|
6 | </p> | |
7 | <% end %> |
|
7 | <% end %> | |
8 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> |
|
8 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> | |
9 |
<%= observe_field :issue_tracker_id, :url => |
|
9 | <%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue), | |
10 | :update => :attributes, |
|
10 | :update => :attributes, | |
11 | :with => "Form.serialize('issue-form')" %> |
|
11 | :with => "Form.serialize('issue-form')" %> | |
12 |
|
12 |
@@ -127,6 +127,9 ActionController::Routing::Routes.draw do |map| | |||||
127 | project.resources :issues, :only => [:index, :new, :create] do |issues| |
|
127 | project.resources :issues, :only => [:index, :new, :create] do |issues| | |
128 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} |
|
128 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} | |
129 | end |
|
129 | end | |
|
130 | # issue form update | |||
|
131 | project.issue_form 'issues/new', :controller => 'issues', :action => 'new', :conditions => {:method => :post} | |||
|
132 | ||||
130 | project.resources :files, :only => [:index, :new, :create] |
|
133 | project.resources :files, :only => [:index, :new, :create] | |
131 | project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post} |
|
134 | project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post} | |
132 | project.resources :news, :shallow => true |
|
135 | project.resources :news, :shallow => true |
@@ -64,6 +64,15 class IssuesTest < ActionController::IntegrationTest | |||||
64 | assert_equal 1, issue.status.id |
|
64 | assert_equal 1, issue.status.id | |
65 | end |
|
65 | end | |
66 |
|
66 | |||
|
67 | def test_update_issue_form | |||
|
68 | log_user('jsmith', 'jsmith') | |||
|
69 | post 'projects/ecookbook/issues/new', :issue => { :tracker_id => "2"} | |||
|
70 | assert_response :success | |||
|
71 | assert_tag 'select', | |||
|
72 | :attributes => {:name => 'issue[tracker_id]'}, | |||
|
73 | :child => {:tag => 'option', :attributes => {:value => '2', :selected => 'selected'}} | |||
|
74 | end | |||
|
75 | ||||
67 | # add then remove 2 attachments to an issue |
|
76 | # add then remove 2 attachments to an issue | |
68 | def test_issue_attachments |
|
77 | def test_issue_attachments | |
69 | log_user('jsmith', 'jsmith') |
|
78 | log_user('jsmith', 'jsmith') |
@@ -97,6 +97,8 class RoutingTest < ActionController::IntegrationTest | |||||
97 | should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml' |
|
97 | should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml' | |
98 |
|
98 | |||
99 | should_route :get, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23' |
|
99 | should_route :get, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23' | |
|
100 | # issue form update | |||
|
101 | should_route :post, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23' | |||
100 | should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23' |
|
102 | should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23' | |
101 | should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml' |
|
103 | should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml' | |
102 |
|
104 |
General Comments 0
You need to be logged in to leave comments.
Login now