diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-07-14 12:22:52 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-07-14 12:22:52 -0700 |
commit | 5979bc9e11d68e11458a27037edffaa368990f27 (patch) | |
tree | 73c8dbcb36eac84fe94195dc786b275b9db45454 /activerecord/test/cases/relation_test.rb | |
parent | 648afea0e4addcaaf6da31cba78b94d7681706a4 (diff) | |
parent | e2d82508148fc4e3d507f70ed236414a75c58672 (diff) | |
download | rails-5979bc9e11d68e11458a27037edffaa368990f27.tar.gz rails-5979bc9e11d68e11458a27037edffaa368990f27.tar.bz2 rails-5979bc9e11d68e11458a27037edffaa368990f27.zip |
Merge pull request #11439 from ernie/only-scan-strings-for-nodes
Blacklist->whitelist for reference scans in order!
Diffstat (limited to 'activerecord/test/cases/relation_test.rb')
-rw-r--r-- | activerecord/test/cases/relation_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index 693b36f35c..c92a20bec3 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -227,6 +227,13 @@ module ActiveRecord assert_equal ['"posts".name ASC'], relation.order_values end + test "#order! on non-string does not attempt regexp match for references" do + obj = Object.new + obj.expects(:=~).never + assert relation.order!(obj) + assert_equal [obj], relation.order_values + end + test '#references!' do assert relation.references!(:foo).equal?(relation) assert relation.references_values.include?('foo') |