@@ -6,7 +6,7 | |||
|
6 | 6 | </p> |
|
7 | 7 | <% end %> |
|
8 | 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 | 10 | :update => :attributes, |
|
11 | 11 | :with => "Form.serialize('issue-form')" %> |
|
12 | 12 |
@@ -127,6 +127,9 ActionController::Routing::Routes.draw do |map| | |||
|
127 | 127 | project.resources :issues, :only => [:index, :new, :create] do |issues| |
|
128 | 128 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} |
|
129 | 129 | end |
|
130 | # issue form update | |
|
131 | project.issue_form 'issues/new', :controller => 'issues', :action => 'new', :conditions => {:method => :post} | |
|
132 | ||
|
130 | 133 | project.resources :files, :only => [:index, :new, :create] |
|
131 | 134 | project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post} |
|
132 | 135 | project.resources :news, :shallow => true |
@@ -64,6 +64,15 class IssuesTest < ActionController::IntegrationTest | |||
|
64 | 64 | assert_equal 1, issue.status.id |
|
65 | 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 | 76 | # add then remove 2 attachments to an issue |
|
68 | 77 | def test_issue_attachments |
|
69 | 78 | log_user('jsmith', 'jsmith') |
@@ -97,6 +97,8 class RoutingTest < ActionController::IntegrationTest | |||
|
97 | 97 | should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml' |
|
98 | 98 | |
|
99 | 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 | 102 | should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23' |
|
101 | 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