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.
2 parents efe121e + 8646911 commit fd6d286Copy full SHA for fd6d286
activerecord/test/cases/statement_cache_test.rb
@@ -109,11 +109,11 @@ def test_unprepared_statements_dont_share_a_cache_with_prepared_statements
109
def test_find_by_does_not_use_statement_cache_if_table_name_is_changed
110
book = Book.create(name: "my book")
111
112
- Book.find_by(name: "my book") # warming the statement cache.
+ Book.find_by(name: book.name) # warming the statement cache.
113
114
# changing the table name should change the query that is not cached.
115
Book.table_name = :birds
116
- assert_nil Book.find_by(name: "my book")
+ assert_nil Book.find_by(name: book.name)
117
ensure
118
Book.table_name = :books
119
end
0 commit comments