aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2014-05-07 04:12:02 +0900
committerYves Senn <yves.senn@gmail.com>2014-05-12 08:47:06 +0200
commit317868d0bd0802d48f29422ce00b8dcddea8ea31 (patch)
tree5116e97b5844f19d1f4cd93d09cbed07e3a3a8d4 /activerecord/test/cases/relation
parent6dd0b7245d9b1bd898871bde0d79842ae88a4d67 (diff)
downloadrails-317868d0bd0802d48f29422ce00b8dcddea8ea31.tar.gz
rails-317868d0bd0802d48f29422ce00b8dcddea8ea31.tar.bz2
rails-317868d0bd0802d48f29422ce00b8dcddea8ea31.zip
Modify assert conditions not to be affected
by each database bind variable naming conventions
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r--activerecord/test/cases/relation/merging_test.rb5
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