[#4180] Block total from getting set on HourlyDeliverables.

This commit is contained in:
Eric Davis
2010-07-02 11:38:29 -07:00
parent fa1ef6bf10
commit 5074667b28
3 changed files with 40 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
require File.dirname(__FILE__) + '/../test_helper'
class HourlyDeliverableTest < ActiveSupport::TestCase
context "#total=" do
should "not write any attributes" do
d = HourlyDeliverable.new
d.total = '$100.00'
assert_equal nil, d.total
end
end
context "clear_total" do
should "clear any total attributes" do
d = HourlyDeliverable.new
d.write_attribute(:total, 100.00)
d.clear_total
assert_equal nil, d.total
end
end
end