Skip to content

Commit

Permalink
Remove the redundant test_find_all_with_join in AR
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jun 2, 2017
1 parent f738863 commit 2b394c8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions activerecord/test/cases/finder_test.rb
Expand Up @@ -1023,16 +1023,6 @@ def test_find_with_bad_sql
assert_raise(ActiveRecord::StatementInvalid) { Topic.find_by_sql "select 1 from badtable" }
end

def test_find_all_with_join
developers_on_project_one = Developer.
joins("LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id").
where("project_id=1").to_a
assert_equal 3, developers_on_project_one.length
developer_names = developers_on_project_one.map(&:name)
assert_includes developer_names, "David"
assert_includes developer_names, "Jamis"
end

def test_joins_dont_clobber_id
first = Firm.
joins("INNER JOIN companies clients ON clients.firm_id = companies.id").
Expand Down

0 comments on commit 2b394c8

Please sign in to comment.