aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation/or_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/relation/or_test.rb')
-rw-r--r--activerecord/test/cases/relation/or_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation/or_test.rb b/activerecord/test/cases/relation/or_test.rb
index 2006fc9611..28a0862f91 100644
--- a/activerecord/test/cases/relation/or_test.rb
+++ b/activerecord/test/cases/relation/or_test.rb
@@ -52,9 +52,11 @@ module ActiveRecord
end
def test_or_with_incompatible_relations
- assert_raises ArgumentError do
+ error = assert_raises ArgumentError do
Post.order('body asc').where('id = 1').or(Post.order('id desc').where(:id => [2, 3])).to_a
end
+
+ assert_equal "Relation passed to #or must be structurally compatible. Incompatible values: [:order]", error.message
end
def test_or_when_grouping