aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-06 11:31:05 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-06 11:31:05 -0700
commit12b3eca420c2de46d34a363c91b2263d366f4d6c (patch)
tree35b900fcfd75f0da9510acd0ebad3bb12ad03a84 /activerecord/test/cases
parent62bb83d0a27e83b0800e67676cfa0d0c47453f8e (diff)
downloadrails-12b3eca420c2de46d34a363c91b2263d366f4d6c.tar.gz
rails-12b3eca420c2de46d34a363c91b2263d366f4d6c.tar.bz2
rails-12b3eca420c2de46d34a363c91b2263d366f4d6c.zip
do not rely on arel class structure
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/method_scoping_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/method_scoping_test.rb b/activerecord/test/cases/method_scoping_test.rb
index 774b50e2e4..5256ab8d11 100644
--- a/activerecord/test/cases/method_scoping_test.rb
+++ b/activerecord/test/cases/method_scoping_test.rb
@@ -208,6 +208,13 @@ class MethodScopingTest < ActiveRecord::TestCase
end
end
+ def test_scope_for_create_only_uses_equal
+ table = VerySpecialComment.arel_table
+ relation = VerySpecialComment.scoped
+ relation.where_values << table[:id].not_eq(1)
+ assert_equal({:type => "VerySpecialComment"}, relation.send(:scope_for_create))
+ end
+
def test_scoped_create
new_comment = nil