[#4182] Finished the rename to LaborBudget.
This commit is contained in:
@@ -75,7 +75,7 @@ class DeliverablesEditTest < ActionController::IntegrationTest
|
|||||||
|
|
||||||
assert_equal 1, @hourly_deliverable.labor_budgets.count
|
assert_equal 1, @hourly_deliverable.labor_budgets.count
|
||||||
@labor_budget = @hourly_deliverable.labor_budgets.first
|
@labor_budget = @hourly_deliverable.labor_budgets.first
|
||||||
assert_equal 20, @labor_budet.hours
|
assert_equal 20, @labor_budget.hours
|
||||||
assert_equal 2000.0, @labor_budget.budget
|
assert_equal 2000.0, @labor_budget.budget
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,21 +5,21 @@ class LaborBudgetTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
context "#budget=" do
|
context "#budget=" do
|
||||||
should "strip dollar signs when writing" do
|
should "strip dollar signs when writing" do
|
||||||
e = LaborExpense.new
|
e = LaborBudget.new
|
||||||
e.budget = '$100.00'
|
e.budget = '$100.00'
|
||||||
|
|
||||||
assert_equal 100.00, e.budget.to_f
|
assert_equal 100.00, e.budget.to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
should "strip commas when writing" do
|
should "strip commas when writing" do
|
||||||
e = LaborExpense.new
|
e = LaborBudget.new
|
||||||
e.budget = '20,100.00'
|
e.budget = '20,100.00'
|
||||||
|
|
||||||
assert_equal 20100.00, e.budget.to_f
|
assert_equal 20100.00, e.budget.to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
should "strip spaces when writing" do
|
should "strip spaces when writing" do
|
||||||
e = LaborExpense.new
|
e = LaborBudget.new
|
||||||
e.budget = '20 100.00'
|
e.budget = '20 100.00'
|
||||||
|
|
||||||
assert_equal 20100.00, e.budget.to_f
|
assert_equal 20100.00, e.budget.to_f
|
||||||
Reference in New Issue
Block a user