[#4181] Added a link to create a new Deliverable.

This commit is contained in:
Eric Davis
2010-06-23 15:02:52 -07:00
parent 2bb36cb550
commit 483fff4e97
4 changed files with 17 additions and 0 deletions
+2
View File
@@ -15,3 +15,5 @@
<% end %>
<%= link_to(l(:button_update), edit_contract_path(@project, resource)) %>
<%= link_to(l(:button_add_new), new_contract_deliverable_path(@project, resource), :id => 'new-deliverable') %>
+1
View File
@@ -0,0 +1 @@
+2
View File
@@ -20,3 +20,5 @@ en:
text_payment_terms_net_15: "Net 15"
text_payment_terms_net_30: "Net 30"
text_payment_terms_net_45: "Net 45"
button_add_new: Add New
+12
View File
@@ -20,5 +20,17 @@ class ContractsShowTest < ActionController::IntegrationTest
end
end
should "have a link to create a new deliverable" do
visit_contracts_for_project(@project)
click_link @contract.id
assert_response :success
assert_select "a#new-deliverable", :text => /Add New/
click_link "Add New"
assert_response :success
assert_template 'deliverables/new'
assert_equal "/projects/main/contracts/#{@contract.id}/deliverables/new", current_url
end
should "show a list of deliverables for the contract"
end