diff options
Diffstat (limited to 'activerecord/test/cases/base_test.rb')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 5812e20a1b..d4433ef889 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -566,6 +566,15 @@ class BasicsTest < ActiveRecord::TestCase assert_equal topic, Topic.find(topic.id) end + def test_destroy_without_prepared_statement + topic = Topic.create(title: 'foo') + Topic.connection.unprepared_statement do + Topic.find(topic.id).destroy + end + + assert_equal nil, Topic.find_by_id(topic.id) + end + def test_blank_ids one = Subscriber.new(:id => '') two = Subscriber.new(:id => '') @@ -1339,6 +1348,7 @@ class BasicsTest < ActiveRecord::TestCase end def test_marshal_between_processes + skip "can't marshal between processes when using an in-memory db" if in_memory_db? skip "fork isn't supported" unless Process.respond_to?(:fork) # Define a new model to ensure there are no caches |