2019-07-11 19:00:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :site do
|
2019-07-12 18:34:16 +00:00
|
|
|
name { "test-#{SecureRandom.hex}" }
|
2019-07-31 20:55:34 +00:00
|
|
|
title { SecureRandom.hex }
|
|
|
|
description { SecureRandom.hex * 2 }
|
2019-07-17 22:18:48 +00:00
|
|
|
design
|
2019-07-19 22:37:53 +00:00
|
|
|
licencia
|
2019-07-25 18:51:32 +00:00
|
|
|
|
|
|
|
after :build do |site|
|
2021-08-07 21:25:54 +00:00
|
|
|
# XXX: Generamos un DeployLocal normalmente y no a través de una
|
|
|
|
# Factory porque necesitamos que el sitio se genere solo.
|
|
|
|
#
|
|
|
|
# @see {https://github.com/thoughtbot/factory_bot/wiki/How-factory_bot-interacts-with-ActiveRecord}
|
|
|
|
site.deploys.build(type: 'DeployLocal')
|
2019-07-25 18:51:32 +00:00
|
|
|
end
|
2019-07-11 19:00:28 +00:00
|
|
|
end
|
|
|
|
end
|