21 lines
441 B
Ruby
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
|