diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-28 16:43:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 16:43:28 -0400 |
commit | 8c65abe5f804522bcbf0d6f4327e7dfad0603941 (patch) | |
tree | d5ccbfd4eb67d82ff4ccd02c4d0b6f067d71fcd6 /activerecord/test/cases/relations_test.rb | |
parent | 97d276bf8a6b9d79dc50fcbc8a45f6071da0fcef (diff) | |
parent | 425f2cacafc522bb0aa426a0a4bc92c1237160aa (diff) | |
download | rails-8c65abe5f804522bcbf0d6f4327e7dfad0603941.tar.gz rails-8c65abe5f804522bcbf0d6f4327e7dfad0603941.tar.bz2 rails-8c65abe5f804522bcbf0d6f4327e7dfad0603941.zip |
Merge pull request #29405 from kamipo/locked_should_not_build_arel
`Relation#locked?` should not build arel
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index dc81f13fe9..5767dec315 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -2007,6 +2007,12 @@ class RelationTest < ActiveRecord::TestCase assert_equal binds, merged.bound_attributes end + def test_locked_should_not_build_arel + posts = Post.locked + assert posts.locked? + assert_nothing_raised { posts.lock!(false) } + end + def test_relation_join_method assert_equal "Thank you for the welcome,Thank you again for the welcome", Post.first.comments.join(",") end |