[#4181] Added a link to create a new Deliverable.
This commit is contained in:
@@ -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') %>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user