[#4552] Add the Labor hours spent to the Deliverable details

This commit is contained in:
Eric Davis
2010-09-29 10:44:54 -07:00
parent 7a5599b4f9
commit 38f2bcb17f
5 changed files with 116 additions and 2 deletions
+34
View File
@@ -281,6 +281,40 @@ class ContractsShowTest < ActionController::IntegrationTest
end
end
should "show the labor hours for the deliverable" do
configure_overhead_plugin
@manager = User.generate!
@deliverable1 = FixedDeliverable.generate!(:contract => @contract, :manager => @manager)
LaborBudget.generate!(:deliverable => @deliverable1,
:hours => 100,
:budget => 4000.5)
@issue1 = Issue.generate_for_project!(@project)
@time_entry1 = TimeEntry.generate!(:issue => @issue1,
:project => @project,
:activity => @billable_activity,
:spent_on => Date.today,
:hours => 10,
:user => @manager)
@rate = Rate.generate!(:project => @project,
:user => @manager,
:date_in_effect => Date.yesterday,
:amount => 100)
@deliverable1.issues << @issue1
assert_equal 1, @deliverable1.issues.count
visit_contract_page(@contract)
assert_select "table#deliverables" do
assert_select "td.labor_hours", :text => /10\/100/
end
end
should "show the current period for a Retainer" do
today_mock = Date.new(2010,2,15)
Date.stubs(:today).returns(today_mock)