mastodon/spec/fabricators/preview_card_fabricator.rb

14 lines
373 B
Ruby
Raw Normal View History

# frozen_string_literal: true
Fabricator(:preview_card) do
2024-11-22 20:32:49 +01:00
transient :image_remote_url
url { Faker::Internet.url }
title { Faker::Lorem.sentence }
description { Faker::Lorem.paragraph }
type 'link'
image { attachment_fixture('attachment.jpg') }
2024-11-22 20:32:49 +01:00
after_build { |preview_card, transients| preview_card[:image_remote_url] = transients[:image_remote_url] }
end