diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-14 20:29:30 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-14 20:29:30 -0300 |
commit | ec6bb3320991df57c00a30c61a03cb5b44942404 (patch) | |
tree | 233b1231971a823734981e4416d2c2597e43431e /activerecord/test/cases/relation | |
parent | f2bff250a017b6da76b7587a164643db31ffbf9b (diff) | |
parent | 1d316ac1fd68962782762b02694a1bf9fd4ef44e (diff) | |
download | rails-ec6bb3320991df57c00a30c61a03cb5b44942404.tar.gz rails-ec6bb3320991df57c00a30c61a03cb5b44942404.tar.bz2 rails-ec6bb3320991df57c00a30c61a03cb5b44942404.zip |
Merge pull request #15078 from nbudin/fix_merger_filter_binds_comparison_master
Make filter_binds filter out symbols that are equal to strings
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r-- | activerecord/test/cases/relation/merging_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/merging_test.rb b/activerecord/test/cases/relation/merging_test.rb index 48f45d45b1..2b5c2fd5a4 100644 --- a/activerecord/test/cases/relation/merging_test.rb +++ b/activerecord/test/cases/relation/merging_test.rb @@ -108,6 +108,11 @@ class RelationMergingTest < ActiveRecord::TestCase merged = left.merge(right) assert_equal post, merged.first end + + def test_merging_compares_symbols_and_strings_as_equal + post = PostThatLoadsCommentsInAnAfterSaveHook.create!(title: "First Post", body: "Blah blah blah.") + assert_equal "First comment!", post.comments.where(body: "First comment!").first_or_create.body + end end class MergingDifferentRelationsTest < ActiveRecord::TestCase |