diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-04 06:18:37 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-08-16 18:47:16 +0900 |
commit | c6a62dc327c54baec87306f5c381e13cacc00a19 (patch) | |
tree | e1fce0374a899b49a00afb987ddfdb1686a43b7a /activerecord/test/cases/finder_test.rb | |
parent | c6900ce1bb3dc2daf7cd1ecfdeeb276f2e9645b5 (diff) | |
download | rails-c6a62dc327c54baec87306f5c381e13cacc00a19.tar.gz rails-c6a62dc327c54baec87306f5c381e13cacc00a19.tar.bz2 rails-c6a62dc327c54baec87306f5c381e13cacc00a19.zip |
Do not handle as an associated predicate if a table has the column
If handled as an associated predicate even though a table has the
column, will generate invalid SQL by valid column name treated as a
table name.
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index f8f9f2d383..85b6b0da0e 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -22,13 +22,13 @@ class FinderTest < ActiveRecord::TestCase fixtures :companies, :topics, :entrants, :developers, :developers_projects, :posts, :comments, :accounts, :authors, :author_addresses, :customers, :categories, :categorizations, :cars def test_find_by_id_with_hash - assert_raises(ActiveRecord::StatementInvalid) do + assert_nothing_raised do Post.find_by_id(limit: 1) end end def test_find_by_title_and_id_with_hash - assert_raises(ActiveRecord::StatementInvalid) do + assert_nothing_raised do Post.find_by_title_and_id("foo", limit: 1) end end |