[#6636] Add Users/Labor table to the deliverable finance report

This commit is contained in:
Eric Davis
2011-10-13 11:16:24 -07:00
parent f972efffbf
commit 084ab1dd96
2 changed files with 61 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
configure_overhead_plugin
@project = Project.generate!(:identifier => 'main').reload
@contract = Contract.generate!(:project => @project, :billable_rate => 10)
@manager = User.generate!
@manager = User.generate!.reload
@deliverable1 = RetainerDeliverable.spawn(:contract => @contract, :manager => @manager, :title => "Retainer Title", :start_date => '2010-01-01', :end_date => '2010-03-31')
@deliverable1.labor_budgets << LaborBudget.spawn(:budget => 100, :hours => 10, :time_entry_activity => @billable_activity)
@deliverable1.overhead_budgets << OverheadBudget.spawn(:budget => 200, :hours => 10)
@@ -120,5 +120,22 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
end
end
should "render the labor finances for each user for the deliverable" do
assert_select "table#deliverable-labor-users" do
assert_select "tr" do
assert_select "td.labor", :text => /#{@manager.name}/
assert_select "td.amount-cost.labor", :text => /\$200/
assert_select "td.time-cost.labor", :text => /2/
end
assert_select "tr.summary-row" do
assert_select "td.labor", :text => /Totals/
assert_select "td.amount-cost.labor", :text => /\$200/
assert_select "td.time-cost.labor", :text => /2/
end
end
end
end
end