未验证 提交 79255d08 编写于 作者: R Ryuta Kamizono 提交者: GitHub

Merge pull request #39048 from...

Merge pull request #39048 from abhaynikam/fix-failing-test-for-upsert-all-on-relation-for-sqlite-adapter

Skip test cases for upsert_all on relation for sqlite adapter for duplicate record
......@@ -373,6 +373,8 @@ def test_insert_all_has_many_through
end
def test_upsert_all_on_relation
skip unless supports_insert_on_duplicate_update?
author = Author.create!(name: "Jimmy")
assert_difference "author.books.count", +1 do
......@@ -381,6 +383,8 @@ def test_upsert_all_on_relation
end
def test_upsert_all_on_relation_precedence
skip unless supports_insert_on_duplicate_update?
author = Author.create!(name: "Jimmy")
second_author = Author.create!(name: "Bob")
......@@ -390,6 +394,8 @@ def test_upsert_all_on_relation_precedence
end
def test_upsert_all_create_with
skip unless supports_insert_on_duplicate_update?
assert_difference "Book.where(format: 'X').count", +2 do
Book.create_with(format: "X").upsert_all([ { name: "A" }, { name: "B" } ])
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册