Skip to content

Commit

Permalink
Merge pull request rails#53879 from aidanharan/skip-unless-upsert-all…
Browse files Browse the repository at this point in the history
…-support

Add missing `supports_insert_on_duplicate_update?` checks to some tests
  • Loading branch information
byroot authored Dec 9, 2024
2 parents 9716747 + 7813fb5 commit 7e06191
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activerecord/test/cases/insert_all_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ def test_upsert_all_on_relation_precedence
end

def test_upsert_all_resets_relation
skip unless supports_insert_on_duplicate_update?

audit_logs = Developer.create!(name: "Alice").audit_logs.load

assert_changes "audit_logs.loaded?", from: true, to: false do
Expand All @@ -786,6 +788,8 @@ def test_upsert_all_create_with
end

def test_upsert_all_has_many_through
skip unless supports_insert_on_duplicate_update?

book = Book.first
assert_raise(ArgumentError) { book.subscribers.upsert_all([ { nick: "Jimmy" } ]) }
end
Expand Down

0 comments on commit 7e06191

Please sign in to comment.