test/validator_test.rb in polish_invoicer-0.0.20 vs test/validator_test.rb in polish_invoicer-0.0.21

- old
+ new

@@ -155,9 +155,20 @@ v = Validator.new(@invoice) v.valid? refute v.errors[:currency] end + def test_exchange_rate + @invoice.exchange_rate = nil + v = Validator.new(@invoice) + v.valid? + assert v.errors[:exchange_rate] + @invoice.exchange_rate = 4,1234 + v = Validator.new(@invoice) + v.valid? + refute v.errors[:exchange_rate] + end + private def check_error(field, value = nil) @invoice.send("#{field}=", value) v = Validator.new(@invoice)