[#4180] Don't let Deliverable types to be changed.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<% form.inputs do %>
|
||||
<%= form.input :title, :required => true %>
|
||||
<%= form.input :type, :required => true, :as => :select, :collection => [["Fixed", "FixedDeliverable"],["Hourly", "HourlyDeliverable"]] %>
|
||||
<%= form.input(:type, :required => true, :as => :select, :collection => [["Fixed", "FixedDeliverable"],["Hourly", "HourlyDeliverable"]]) if resource.new_record? %>
|
||||
<%= form.input :manager, :required => true, :collection => @project.users %>
|
||||
<%= form.input :start_date, :as => :string, :input_html => {:size => 10}, :hint => calendar_for('deliverable_start_date') %>
|
||||
<%= form.input :end_date, :as => :string, :input_html => {:size => 10}, :hint => calendar_for('deliverable_end_date') %>
|
||||
|
||||
@@ -22,11 +22,10 @@ class DeliverablesEditTest < ActionController::IntegrationTest
|
||||
|
||||
assert_select "form#edit_fixed_deliverable_#{@fixed_deliverable.id}" do
|
||||
assert_select "input#fixed_deliverable_title[value=?]", /#{@fixed_deliverable.title}/
|
||||
assert_select "select#fixed_deliverable_type" do
|
||||
assert_select "option[selected=selected][value=FixedDeliverable]"
|
||||
end
|
||||
end
|
||||
|
||||
assert_select "select#fixed_deliverable_type", :count => 0 # Not editable
|
||||
|
||||
fill_in "Title", :with => 'An updated title'
|
||||
check "Feature Sign Off"
|
||||
check "Warranty Sign Off"
|
||||
@@ -50,11 +49,10 @@ class DeliverablesEditTest < ActionController::IntegrationTest
|
||||
|
||||
assert_select "form#edit_hourly_deliverable_#{@hourly_deliverable.id}" do
|
||||
assert_select "input#hourly_deliverable_title[value=?]", /#{@hourly_deliverable.title}/
|
||||
assert_select "select#hourly_deliverable_type" do
|
||||
assert_select "option[selected=selected][value=HourlyDeliverable]"
|
||||
end
|
||||
end
|
||||
|
||||
assert_select "select#hourly_deliverable_type", :count => 0 # Not editable
|
||||
|
||||
fill_in "Title", :with => 'An updated title'
|
||||
check "Feature Sign Off"
|
||||
check "Warranty Sign Off"
|
||||
|
||||
Reference in New Issue
Block a user