diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-05-12 08:47:25 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-05-12 08:47:25 +0200 |
commit | 5b73405f2e78db94235de49bd2c297c60892bbcd (patch) | |
tree | d19c6609bdf5f60483f42b17850f67ff57f8aeb2 /activerecord/test/cases | |
parent | 8e95e5448e7094d59488db527d6104568404d627 (diff) | |
parent | 317868d0bd0802d48f29422ce00b8dcddea8ea31 (diff) | |
download | rails-5b73405f2e78db94235de49bd2c297c60892bbcd.tar.gz rails-5b73405f2e78db94235de49bd2c297c60892bbcd.tar.bz2 rails-5b73405f2e78db94235de49bd2c297c60892bbcd.zip |
Merge pull request #14999 from yahonda/modify_bind_variable_name
Modify assert conditions not to be affected
by each database bind variable naming conventions
Closes #14999.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relation/merging_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/relation/merging_test.rb b/activerecord/test/cases/relation/merging_test.rb index ff1c2a0d82..48f45d45b1 100644 --- a/activerecord/test/cases/relation/merging_test.rb +++ b/activerecord/test/cases/relation/merging_test.rb @@ -17,8 +17,9 @@ class RelationMergingTest < ActiveRecord::TestCase end def test_relation_to_sql - sql = Post.first.comments.to_sql - assert_no_match(/\?/, sql) + post = Post.first + sql = post.comments.to_sql + assert_match(/.?post_id.? = #{post.id}\Z/i, sql) end def test_relation_merging_with_arel_equalities_keeps_last_equality |