[#4182] Testing and fixing patches from the Overhead plugin to Deliverables.

This commit is contained in:
Eric Davis
2010-07-07 12:50:48 -07:00
parent cb9740571b
commit 897a6e2aa2
2 changed files with 50 additions and 0 deletions
+7
View File
@@ -10,4 +10,11 @@ class FixedDeliverable < Deliverable
def short_type
'F'
end
# Hardcoded value used as a wrapper for the old Budget plugin API.
#
# The Overhead plugin uses this in it's calcuations.
def fixed_cost
0
end
end
@@ -0,0 +1,43 @@
require 'test_helper'
class OverheadPluginIntegrationTest < ActionController::IntegrationTest
def setup
@project = Project.generate!(:identifier => 'main')
@contract = Contract.generate!(:project => @project, :name => 'A Contract', :payment_terms => 'net_15')
@manager = User.generate!
@role = Role.generate!
User.add_to_project(@manager, @project, @role)
@fixed_deliverable = FixedDeliverable.generate!(:contract => @contract, :manager => @manager, :title => 'The Title')
@hourly_deliverable = HourlyDeliverable.generate!(:contract => @contract, :manager => @manager, :title => 'An Hourly')
end
context "Patches to Deliverable" do
context "#overhead_spent" do
should "return the total cost for all of the time on the issues for non-billable activities"
end
end
context "Patches to HourlyDeliverable" do
context "#labor_budget_spent" do
should "return 0 if there are no issues assigned" do
assert_equal 0, @hourly_deliverable.issues.count
assert_equal 0, @hourly_deliverable.labor_budget_spent
end
should "return the total cost for all of the time on the issues for billable activities"
end
end
context "Patches to FixedDeliverable" do
context "#labor_budget_spent" do
should "return 0 if there are no issues assigned" do
assert_equal 0, @fixed_deliverable.issues.count
assert_equal 0, @fixed_deliverable.labor_budget_spent
end
should "return the total cost for all of the time on the issues for billable activities"
end
end
end