diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/finder_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 06c5229433..1ac97271eb 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -292,8 +292,11 @@ class FinderTest < Test::Unit::TestCase end def test_find_all_with_join - developers_on_project_one = Developer.find :all, :joins => 'developers_projects', :conditions => 'id=developer_id AND project_id=1' - + developers_on_project_one = Developer.find( + :all, + :joins => 'LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id', + :conditions => 'project_id=1' + ) assert_equal 2, developers_on_project_one.length developer_names = developers_on_project_one.map { |d| d.name } assert developer_names.include?('David') |