diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2015-10-31 01:04:23 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2015-10-31 01:37:35 +0900 |
commit | d3411ad361bf1d02b1f9e1724c1298e7de3670ea (patch) | |
tree | ba35631d90691a08bfa1eba4ab7a6014702d5f09 /activerecord/test/cases/associations | |
parent | 6c61ae816ad7326e510a8f019cadc6db4cc9dae0 (diff) | |
download | rails-d3411ad361bf1d02b1f9e1724c1298e7de3670ea.tar.gz rails-d3411ad361bf1d02b1f9e1724c1298e7de3670ea.tar.bz2 rails-d3411ad361bf1d02b1f9e1724c1298e7de3670ea.zip |
Alias left_joins to left_outer_joins
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/left_outer_join_association_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/left_outer_join_association_test.rb b/activerecord/test/cases/associations/left_outer_join_association_test.rb index a362b43cc3..847292d5a0 100644 --- a/activerecord/test/cases/associations/left_outer_join_association_test.rb +++ b/activerecord/test/cases/associations/left_outer_join_association_test.rb @@ -29,6 +29,11 @@ class LeftOuterJoinAssociationTest < ActiveRecord::TestCase assert_equal Author.count, Author.left_outer_joins(:posts).count end + def test_left_outer_join_by_left_joins + assert_not_equal Author.count, Author.joins(:posts).count + assert_equal Author.count, Author.left_joins(:posts).count + end + def test_construct_finder_sql_ignores_empty_left_outer_joins_hash sql = capture_sql { Author.left_outer_joins({}) }.first assert_no_match(/LEFT OUTER JOIN/i, sql) |