Permalink
Browse files

Adding an ambiguous safety check.

  • Loading branch information...
1 parent 9dcee4b commit 7eaee808debcf87328656234c3f2bbe9b88ceeaa @JEG2 committed Jun 17, 2008
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/tc_update.rb
View
@@ -39,6 +39,12 @@ def test_field_names_must_be_at_least_one_supported_character_long
end
end
+ def test_ambiguous_field_names_raise_errors
+ assert_raise(RRDB::FieldNameConflictError) do
+ @db.update(Time.now, "ab" => 8, "a'b" => 9)
+ end
+ end
+
def test_you_can_retrieve_the_field_name_used
assert_equal( ("a".."z").to_a.join[0..18],
RRDB.field_name(("a".."z").to_a.join.gsub(/\b/, "'")) )

0 comments on commit 7eaee80

Please sign in to comment.