提交 f7b15824 编写于 作者: R Ryuta Kamizono

Add regression test for https://github.com/rails/rails/pull/40178#issuecomment-688222844

It is a common use case especially for MySQL users.
上级 d04acc0b
......@@ -33,6 +33,13 @@ def test_delete_all
assert_not_predicate davids, :loaded?
end
def test_delete_all_with_index_hint
davids = Author.where(name: "David").from("#{Author.quoted_table_name} /*! USE INDEX (PRIMARY) */")
assert_difference("Author.count", -1) { davids.delete_all }
assert_not_predicate davids, :loaded?
end
def test_delete_all_loaded
davids = Author.where(name: "David")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册