Extract detached-blob guard into its own file
Separate the attachment existence check from the broadcast suppression override so each file has a single responsibility. The guard now lives in ActiveStorageAnalyzeJobSkipDetached with its own documentation explaining the upload-then-delete race condition. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
require "test_helper"
|
||||
|
||||
class ActiveStorageAnalyzeJobSuppressBroadcastsTest < ActiveSupport::TestCase
|
||||
class ActiveStorageAnalyzeJobSkipDetachedTest < ActiveSupport::TestCase
|
||||
test "skips analysis when blob has no attachments" do
|
||||
blob = ActiveStorage::Blob.create_and_upload!(
|
||||
io: StringIO.new("x" * 1024), filename: "orphan.txt", content_type: "text/plain"
|
||||
Reference in New Issue
Block a user