Skip to content

Commit 59c32ab

Browse files
committed
Fixup test for rails#48139
1 parent 06c2a49 commit 59c32ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

activerecord/test/cases/insert_all_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def test_insert_with_type_casting_and_serialize_is_consistent
5353
book_name = ["Array"]
5454
created_book_id = Book.create!(name: book_name).id
5555
inserted_book_id = Book.insert!({ name: book_name }, returning: :id).first["id"]
56-
raw_created_book_name = Book.connection.select_value(Book.select(:name).where(id: created_book_id))
57-
raw_inserted_book_name = Book.connection.select_value(Book.select(:name).where(id: inserted_book_id))
58-
assert_equal raw_created_book_name, raw_inserted_book_name
56+
created_book = Book.find_by!(id: created_book_id)
57+
inserted_book = Book.find_by!(id: inserted_book_id)
58+
assert_equal created_book.name, inserted_book.name
5959
end
6060

6161
def test_insert_all

0 commit comments

Comments
 (0)