[#4568] Change FixedDeliverable so it's markup is automatically paid
This commit is contained in:
1 parent
0fd801c709
commit
7a5599b4f9
3 files changed
+18
-1
No files matched your search
@@ -275,7 +275,7 @@ class ContractsShowTest < ActionController::IntegrationTest
|
||||
visit_contract_page(@contract)
|
||||
assert_select "table#deliverables" do
|
||||
assert_select "#deliverable_details_#{@deliverable1.id}" do
|
||||
assert_select 'td.fixed_markup_budget_spent', :text => '100'
|
||||
assert_select 'td.fixed_markup_budget_spent', :text => '4,100'
|
||||
assert_select 'td.fixed_markup_budget_total', :text => '4,100'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,4 +65,15 @@ class FixedDeliverableTest < ActiveSupport::TestCase
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
context "#fixed_markup_budget_total_spent" do
|
||||
should "be the total markup from fixed budgets because FixedDeliverables are considered 100% paid" do
|
||||
@deliverable = FixedDeliverable.generate!
|
||||
FixedBudget.generate!(:deliverable => @deliverable, :budget => '$1,000', :markup => '$100', :paid => true)
|
||||
FixedBudget.generate!(:deliverable => @deliverable, :budget => '$1,000', :markup => '$100', :paid => false)
|
||||
|
||||
assert_equal 200, @deliverable.fixed_markup_budget_total_spent
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user