5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 13:26:21 +00:00
panel/test/factories/document.rb
f 678bf88da3
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
feat: poder generar modelos para los tests
2023-10-06 11:00:50 -03:00

27 lines
458 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :document, class: Jekyll::Document do
site do
build(:jekyll)
end
collection do
build(:collection, site: site)
end
path do
'2023-01-01-document.markdown'
end
date do
Date.today.to_time
end
initialize_with do
new(path, site: site, collection: collection).tap do |doc|
doc.data['date'] = date
end
end
end
end