Files
redux-scraper/spec/factories/blob_entries.rb
2025-02-05 03:46:16 +00:00

21 lines
441 B
Ruby

# typed: false
FactoryBot.define do
factory :blob_entry do
transient { content { "test content #{SecureRandom.alphanumeric(10)}" } }
content_type { "text/plain" }
sha256 { Digest::SHA256.digest(content) }
contents { content }
size { content.bytesize }
trait :html do
content_type { "text/html" }
end
trait :json do
content_type { "application/json" }
content { "{}" }
end
end
end