diff options
author | Marc Lennox <marc.lennox@gmail.com> | 2013-09-27 10:10:27 -0400 |
---|---|---|
committer | Marc Lennox <marc.lennox@gmail.com> | 2013-09-27 14:26:17 -0400 |
commit | 747ccb0f7c9bdecb96369b2867aca8e746064b57 (patch) | |
tree | a6b90323b3ac0d581c235fc5bd804559993793dc /activerecord/test | |
parent | 777b72ba1a89a7f100f528494f0b4e533cc0b20f (diff) | |
download | rails-747ccb0f7c9bdecb96369b2867aca8e746064b57.tar.gz rails-747ccb0f7c9bdecb96369b2867aca8e746064b57.tar.bz2 rails-747ccb0f7c9bdecb96369b2867aca8e746064b57.zip |
Fixed issue #12327
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 5812e20a1b..a2f350817c 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 => '') |