We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 430b252 commit c59e902Copy full SHA for c59e902
activerecord/test/cases/base_test.rb
@@ -554,13 +554,19 @@ def test_hashing
554
assert_equal [ Topic.find(1) ], [ Topic.find(2).topic ] & [ Topic.find(1) ]
555
end
556
557
- def test_comparison
+ def test_successful_comparison_of_like_class_records
558
topic_1 = Topic.create!
559
topic_2 = Topic.create!
560
561
assert_equal [topic_2, topic_1].sort, [topic_1, topic_2]
562
563
564
+ def test_failed_comparison_of_unlike_class_records
565
+ assert_raises ArgumentError do
566
+ [ topics(:first), posts(:welcome) ].sort
567
+ end
568
569
+
570
def test_create_without_prepared_statement
571
topic = Topic.connection.unprepared_statement do
572
Topic.create(:title => 'foo')
0 commit comments