mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-10 04:06:27 +01:00
14 lines
373 B
Ruby
14 lines
373 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:preview_card) do
|
|
transient :image_remote_url
|
|
|
|
url { Faker::Internet.url }
|
|
title { Faker::Lorem.sentence }
|
|
description { Faker::Lorem.paragraph }
|
|
type 'link'
|
|
image { attachment_fixture('attachment.jpg') }
|
|
|
|
after_build { |preview_card, transients| preview_card[:image_remote_url] = transients[:image_remote_url] }
|
|
end
|