aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorEmanuel Evans <mail@emanuel.industries>2015-12-28 14:28:19 -0800
committerEmanuel Evans <mail@emanuel.industries>2015-12-28 14:28:19 -0800
commit95254e4f129cedd4048c63e2f068227d5f80864d (patch)
tree9b674b47c06fdc7275886c522cb3d419a01a1b06 /activerecord/test
parent0d2675f84f54504e5ba25b2f53b00bac239ef393 (diff)
downloadrails-95254e4f129cedd4048c63e2f068227d5f80864d.tar.gz
rails-95254e4f129cedd4048c63e2f068227d5f80864d.tar.bz2
rails-95254e4f129cedd4048c63e2f068227d5f80864d.zip
Allow add_to_transaction with null transaction
Fixes https://github.com/rails/rails/issues/22819
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/transactions_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb
index ec5bdfd725..791b895d02 100644
--- a/activerecord/test/cases/transactions_test.rb
+++ b/activerecord/test/cases/transactions_test.rb
@@ -58,6 +58,11 @@ class TransactionTest < ActiveRecord::TestCase
end
end
+ def test_add_to_null_transaction
+ topic = Topic.new
+ topic.add_to_transaction
+ end
+
def test_successful_with_return
committed = false