diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-06-02 19:05:41 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-06-02 20:08:00 +0900 |
commit | 2b394c843f9d6fc866d5a37ca8dae73fc629a08f (patch) | |
tree | f440049d3b311b98b236e8954b672f813e40c31d | |
parent | f7388635f246b97a1aa0be54579339c6659fb865 (diff) | |
download | rails-2b394c843f9d6fc866d5a37ca8dae73fc629a08f.tar.gz rails-2b394c843f9d6fc866d5a37ca8dae73fc629a08f.tar.bz2 rails-2b394c843f9d6fc866d5a37ca8dae73fc629a08f.zip |
Remove the redundant `test_find_all_with_join` in AR
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 4837a169fa..420f552ef6 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -1023,16 +1023,6 @@ class FinderTest < ActiveRecord::TestCase 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"). |