Skip to content

Commit a8af4ea

Browse files
committed
Ignore context/source in error subscriber test
1 parent d8c45ed commit a8af4ea

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

test/unit/execution_test.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ def test_async_errors_are_reported
2424
sleep 0.1
2525
assert_equal 1, error_subscriber.errors.count
2626
assert_equal "Boom!", error_subscriber.errors.first[0].message
27-
if Rails.version >= "7.1"
28-
assert_equal({ context: {}, handled: false, level: :error, source: "application.active_support" }, error_subscriber.errors.first[1])
29-
else
30-
assert_equal({ context: {}, handled: false, level: :error, source: nil }, error_subscriber.errors.first[1])
31-
end
27+
assert_equal :error, error_subscriber.errors.first[1][:level]
28+
assert_equal false, error_subscriber.errors.first[1][:handled]
3229
ensure
3330
Rails.error.unsubscribe(error_subscriber) if Rails.error.respond_to?(:unsubscribe)
3431
@all_stores = [] #  to avoid waiting for background tasks as the error one won't have completed

0 commit comments

Comments
 (0)