diff options
Diffstat (limited to 'activerecord/test/pk_test.rb')
-rw-r--r-- | activerecord/test/pk_test.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/activerecord/test/pk_test.rb b/activerecord/test/pk_test.rb index 604b263571..4daef43062 100644 --- a/activerecord/test/pk_test.rb +++ b/activerecord/test/pk_test.rb @@ -4,9 +4,10 @@ require 'fixtures/reply' require 'fixtures/subscriber' require 'fixtures/movie' require 'fixtures/keyboard' +require 'fixtures/mixed_case_monkey' class PrimaryKeysTest < Test::Unit::TestCase - fixtures :topics, :subscribers, :movies + fixtures :topics, :subscribers, :movies, :mixed_case_monkeys def test_integer_key topic = Topic.find(1) @@ -78,4 +79,23 @@ class PrimaryKeysTest < Test::Unit::TestCase Topic.reset_primary_key assert_equal "id", Topic.primary_key end + + def test_delete_should_quote_pkey + assert_nothing_raised { MixedCaseMonkey.delete(1) } + end + def test_update_counters_should_quote_pkey_and_quote_counter_columns + assert_nothing_raised { MixedCaseMonkey.update_counters(1, :fleaCount => 99) } + end + def test_find_with_one_id_should_quote_pkey + assert_nothing_raised { MixedCaseMonkey.find(1) } + end + def test_find_with_multiple_ids_should_quote_pkey + assert_nothing_raised { MixedCaseMonkey.find([1,2]) } + end + def test_instance_update_should_quote_pkey + assert_nothing_raised { MixedCaseMonkey.find(1).save } + end + def test_instance_destry_should_quote_pkey + assert_nothing_raised { MixedCaseMonkey.find(1).destroy } + end end |