test/unit/data_entry_test.rb in zena-0.16.9 vs test/unit/data_entry_test.rb in zena-1.0.0.beta1

- old
+ new

@@ -62,11 +62,17 @@ def test_data_precision login(:ant) ent = DataEntry.create(:node_a_id => nodes_id(:wiki), :value_a => 3.1415926535897932384, :value_b => 0.1234567890) ent = DataEntry.find(ent[:id]) - assert_equal BigDecimal("3.14159265"), ent.value # round to 8 digit precision - assert_equal BigDecimal("0.12345679"), ent.value_b # round to 8 digit precision + case Zena::Db.adapter + when 'sqlite3' + assert_equal BigDecimal("3.14159265358979"), ent.value # round to 14 digit precision + assert_equal BigDecimal("0.123456789"), ent.value_b # round to 14 digit precision + else + assert_equal BigDecimal("3.14159265"), ent.value # round to 8 digit precision + assert_equal BigDecimal("0.12345679"), ent.value_b # round to 8 digit precision + end end def test_clone login(:ant) ent = data_entries(:comment)